From 21dee9ba6a957973112ce991fb9566ba52510026 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Tue, 13 Aug 2024 12:32:34 -0400 Subject: [PATCH 1/3] fix(test): increase timeout Signed-off-by: Elizabeth Danzberger --- cypress/e2e/nodes/ImageView.spec.js | 4 ++-- cypress/support/commands.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/nodes/ImageView.spec.js b/cypress/e2e/nodes/ImageView.spec.js index 38832c1ef4a..8a9f5f85562 100644 --- a/cypress/e2e/nodes/ImageView.spec.js +++ b/cypress/e2e/nodes/ImageView.spec.js @@ -127,7 +127,7 @@ describe('Image View', () => { cy.openFile(fileName) cy.getContent() - .find('[data-component="image-view"][data-src=".attachments.123/github.png"] img') + .find('[data-component="image-view"][data-src=".attachments.123/github.png"] img', { timeout: 20000 }) .click() cy.get('.modal__content img') @@ -140,7 +140,7 @@ describe('Image View', () => { cy.openFile(fileName) cy.getContent() - .find('[data-component="image-view"][data-src=".attachments.123/file.txt.gz"] img') + .find('[data-component="image-view"][data-src=".attachments.123/file.txt.gz"] img', { timeout: 20000 }) .click() const downloadsFolder = Cypress.config('downloadsFolder') diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c5cf132ac5b..5d867fa6561 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -324,8 +324,8 @@ Cypress.Commands.add('getModal', () => { Cypress.Commands.add('getEditor', { prevSubject: 'optional' }, (subject) => { return subject - ? cy.wrap(subject).find('[data-text-el="editor-container"]') - : cy.get('[data-text-el="editor-container"]') + ? cy.wrap(subject).find('[data-text-el="editor-container"]', { timeout: 20000 }) + : cy.get('[data-text-el="editor-container"]', { timeout: 20000 }) }) Cypress.Commands.add('getMenu', { prevSubject: 'optional' }, (subject) => { From e77ae2a6f02c6973374b2de65697b9467e261fcd Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Tue, 13 Aug 2024 16:20:18 -0400 Subject: [PATCH 2/3] chore(test): troubleshoot tests on CI Signed-off-by: Elizabeth Danzberger --- cypress/e2e/nodes/ImageView.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/nodes/ImageView.spec.js b/cypress/e2e/nodes/ImageView.spec.js index 8a9f5f85562..99f90236b94 100644 --- a/cypress/e2e/nodes/ImageView.spec.js +++ b/cypress/e2e/nodes/ImageView.spec.js @@ -128,7 +128,7 @@ describe('Image View', () => { cy.getContent() .find('[data-component="image-view"][data-src=".attachments.123/github.png"] img', { timeout: 20000 }) - .click() + .click({ force: true }) cy.get('.modal__content img') .should('have.attr', 'src') @@ -141,7 +141,7 @@ describe('Image View', () => { cy.getContent() .find('[data-component="image-view"][data-src=".attachments.123/file.txt.gz"] img', { timeout: 20000 }) - .click() + .click({ force: true }) const downloadsFolder = Cypress.config('downloadsFolder') cy.log(`downloadsFolder: ${downloadsFolder}`) From 893ab3b9b57eb3b6776ae48e93e06b030e131221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Aug 2024 21:48:46 +0200 Subject: [PATCH 3/3] tmp: try chrome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .github/workflows/cypress-e2e.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-e2e.yml b/.github/workflows/cypress-e2e.yml index acc56a43a11..2a446fe4fb6 100644 --- a/.github/workflows/cypress-e2e.yml +++ b/.github/workflows/cypress-e2e.yml @@ -169,11 +169,19 @@ jobs: curl -v http://localhost:8081/index.php/login cat data/nextcloud.log + - uses: browser-actions/setup-chrome@v1 + with: + chrome-version: 114 + install-dependencies: true + install-chromedriver: true + chromedriver-version: 114 + - run: chrome --version + - name: Run E2E cypress tests run: | cd 'apps/${{ env.APP_NAME }}' npx wait-on $CYPRESS_baseUrl - npx cypress run --record false --config defaultCommandTimeout=10000,video=false + npx cypress run --record false --config defaultCommandTimeout=10000,video=false --browser chrome env: # https://github.com/cypress-io/github-action/issues/124 COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}