From 09266585c90ca6015b0218e21045310b08721e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Oct 2023 10:10:16 +0200 Subject: [PATCH] ci: Disable service worker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/fixtures/preview-service-worker.txt | 0 cypress/support/e2e.js | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 cypress/fixtures/preview-service-worker.txt diff --git a/cypress/fixtures/preview-service-worker.txt b/cypress/fixtures/preview-service-worker.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index aa6564bba1e..434e87f32d7 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -4,6 +4,16 @@ import './commands.js' import './sessions.js' import chaiExtension from './chai.js' +beforeEach(() => { + cy.intercept('GET', '**/preview-service-worker.js', { fixture: 'preview-service-worker.txt' }) +}) + +Cypress.on('window:before:load', (win) => { + // disable service workers + // eslint-disable-next-line + delete win.navigator.ServiceWorker +}) + before(() => { chai.use(chaiExtension)