From a77b57918aaed4b6d619710406e68913fff90569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 17:09:36 +0200 Subject: [PATCH] Try to intercept service worker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .github/workflows/cypress.yml | 2 +- cypress/fixtures/preview-service-worker.js | 0 cypress/support/e2e.js | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 cypress/fixtures/preview-service-worker.js diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 5b556749528..6bf348bf3fa 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: repository: nextcloud/server - ref: debug/session-csrf + ref: master submodules: true - name: Checkout viewer diff --git a/cypress/fixtures/preview-service-worker.js b/cypress/fixtures/preview-service-worker.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index b45b9a8bc9f..eb417117c6a 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -4,6 +4,10 @@ import './commands.js' import './sessions.js' import chaiExtension from './chai.js' +beforeEach(() => { + cy.intercept('GET', '**/preview-service-worker.js', { fixture: 'preview-service-worker.js' }) +}) + before(() => { chai.use(chaiExtension) })