Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): increase timeout #6203

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/cypress-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/nodes/ImageView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ describe('Image View', () => {
cy.openFile(fileName)

cy.getContent()
.find('[data-component="image-view"][data-src=".attachments.123/github.png"] img')
.click()
.find('[data-component="image-view"][data-src=".attachments.123/github.png"] img', { timeout: 20000 })
.click({ force: true })

cy.get('.modal__content img')
.should('have.attr', 'src')
Expand All @@ -140,8 +140,8 @@ describe('Image View', () => {
cy.openFile(fileName)

cy.getContent()
.find('[data-component="image-view"][data-src=".attachments.123/file.txt.gz"] img')
.click()
.find('[data-component="image-view"][data-src=".attachments.123/file.txt.gz"] img', { timeout: 20000 })
.click({ force: true })

const downloadsFolder = Cypress.config('downloadsFolder')
cy.log(`downloadsFolder: ${downloadsFolder}`)
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the replay it seems to be not the timeout but somehow viewer is not opening but the file is downloaded instead:

Screenshot 2024-08-14 at 08 44 43

})

Cypress.Commands.add('getMenu', { prevSubject: 'optional' }, (subject) => {
Expand Down
Loading