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

test(cypress): Await promise in response to prevent timeout #47671

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 1, 2024

Summary

The idea is to:

  1. intercept the request
  2. then test the loading state,
  3. and after the tests continue the request

Problem here: cy.intercept has a timeout on the request-handler which uses the same timeout as DOM assertions (4s) we could increase it, but this also will increase DOM assertion timeout.

So instead we do not await in the request handler, but in the response handler. This should use the response timeout which is much higher (30s).

Checklist

The idea is to intercept the request,
then test the loading state,
and after the tests continue the request.

Problem here: `cy.intercept` has a timeout on the request-handler
which uses the same timeout as DOM assertions (4s) we could increase it,
but this also will increase DOM assertion timeout.

So instead we do not await in the request handler, but in the response handler.
This should use the response timeout which is much higher (30s).

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added 3. to review Waiting for reviews tests Related to tests CI labels Sep 1, 2024
@susnux susnux added this to the Nextcloud 31 milestone Sep 1, 2024
@susnux susnux merged commit 69f4a39 into master Sep 2, 2024
116 checks passed
@susnux susnux deleted the chore/cypress-intercept-timeout branch September 2, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews CI tests Related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants