From 849bb622ad9b25bbb79946a286a86a46870ec092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 23 Jun 2023 12:27:38 +0200 Subject: [PATCH 01/11] tmp: remove cancel 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 | 4 ---- .github/workflows/phpunit-mysql.yml | 4 ---- .github/workflows/phpunit-oci.yml | 4 ---- 3 files changed, 12 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index a3b995b31d5..09aa74be262 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -8,10 +8,6 @@ on: - master - stable* -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - env: APP_NAME: text CYPRESS_baseUrl: http://localhost:8081/index.php diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 988010b63f1..8e5da2382b8 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -28,10 +28,6 @@ on: permissions: contents: read -concurrency: - group: phpunit-mysql-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - jobs: phpunit-mysql: runs-on: ubuntu-latest diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 129f848cc69..b0b2fff38ed 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -28,10 +28,6 @@ on: permissions: contents: read -concurrency: - group: phpunit-oci-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - jobs: phpunit-oci: runs-on: ubuntu-22.04 From 33fc2497ef83be0cb3f4c052ee4ff0e3c4f98d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 25 Jun 2023 18:46:31 +0200 Subject: [PATCH 02/11] debug: log level 0 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 09aa74be262..4826eb8bd3d 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -118,7 +118,7 @@ jobs: PHP_CLI_SERVER_WORKERS: 10 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + echo '0,"memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php php occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin php -f index.php php -S 0.0.0.0:8081 & @@ -157,9 +157,9 @@ jobs: - name: Upload nextcloud logs uses: actions/upload-artifact@v2 - if: failure() + if: always() with: - name: Upload nextcloud log + name: Upload nextcloud log ${{ matrix.containers }} path: data/nextcloud.log retention-days: 5 From 24fcfdfca82dfb8e02dcf3bfbca73021b05d8173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 25 Jun 2023 18:55:37 +0200 Subject: [PATCH 03/11] ci(cypress): Update config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress.config.js b/cypress.config.js index 7108e9ae8e8..9093b54157e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -17,13 +17,13 @@ module.exports = defineConfig({ }, baseUrl: 'http://localhost:8081/index.php/', - experimentalSessionAndOrigin: true, specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + experimentalRunAllSpecs: true, }, retries: { - runMode: 2, + runMode: 0, // do not retry in `cypress open` openMode: 0, }, - "numTestsKeptInMemory": 5, + numTestsKeptInMemory: 5, }) From d52ac3ef09cdbfcd6430a6d31955063de89176c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 26 Jun 2023 09:10:22 +0200 Subject: [PATCH 04/11] debug: use server debugging branch 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 4826eb8bd3d..5f3b743ebcc 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: ${{ matrix.server-versions }} + ref: debug/session-csrf submodules: true - name: Checkout viewer From 42ac3f45f2b7efd7f44ff7f24b1914f8f653fb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 26 Jun 2023 11:51:21 +0200 Subject: [PATCH 05/11] ci(cypress): Use cron 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 5f3b743ebcc..5b556749528 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -123,6 +123,7 @@ jobs: php -f index.php php -S 0.0.0.0:8081 & export OC_PASS=1234561 + php occ background:cron php occ user:add --password-from-env user1 php occ user:add --password-from-env user2 php occ app:enable viewer From 5eb6b5a91e944f827eafee912a8fe16d013fe9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 26 Jun 2023 17:53:43 +0200 Subject: [PATCH 06/11] fix: disable service workers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/support/e2e.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 7d695e5c7e1..b45b9a8bc9f 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -7,3 +7,9 @@ import chaiExtension from './chai.js' before(() => { chai.use(chaiExtension) }) + +Cypress.on('window:before:load', (win) => { + // disable service workers + // eslint-disable-next-line + delete win.navigator.ServiceWorker +}) 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 07/11] 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) }) From bf3c78722525953b936142164602af4c4504331a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 17:22:05 +0200 Subject: [PATCH 08/11] attempt 1687965725 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl From f8c2a3edfd50ee1dafed70d9cbb4dae9aee7f0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 17:47:04 +0200 Subject: [PATCH 09/11] fix file type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../{preview-service-worker.js => preview-service-worker.txt} | 0 cypress/support/e2e.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename cypress/fixtures/{preview-service-worker.js => preview-service-worker.txt} (100%) diff --git a/cypress/fixtures/preview-service-worker.js b/cypress/fixtures/preview-service-worker.txt similarity index 100% rename from cypress/fixtures/preview-service-worker.js rename to cypress/fixtures/preview-service-worker.txt diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index eb417117c6a..8be45a6ad77 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -5,7 +5,7 @@ import './sessions.js' import chaiExtension from './chai.js' beforeEach(() => { - cy.intercept('GET', '**/preview-service-worker.js', { fixture: 'preview-service-worker.js' }) + cy.intercept('GET', '**/preview-service-worker.js', { fixture: 'preview-service-worker.txt' }) }) before(() => { From 603ea41ee6c3bf31a4f1e103e08011e9cfc9d4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 20:38:27 +0200 Subject: [PATCH 10/11] attempt 1687977507 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl From 6e2751779b3f4b3e352c7a2e5ccb3510bff22e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Jun 2023 20:53:07 +0200 Subject: [PATCH 11/11] attempt 1687978387 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl