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

[legacy-framework] Fix RedirectError incorrectly failing Cypress tests #2655

Merged
merged 1 commit into from
Aug 18, 2021
Merged

Conversation

akbo
Copy link

@akbo akbo commented Aug 17, 2021

Closes blitz-js/legacy-framework#47

What are the changes and their implications?

In development, if Cypress is detected, the following errors will be hidden from Cypress, so they don't fail E2E tests: RedirectError, AuthenticationError, AuthorizationError, NotFoundError. For all other errors, the Cypress behavior is preserved.

Bug Checklist

This can only be tested with Cypress (test if Cypress fails a test that, e.g., logs in to an app). The auth example app has a Cypress test that covers the RedirectError. Not sure how to proceed here. What do you think?

@akbo
Copy link
Author

akbo commented Aug 17, 2021

There is one failing Nextjs integration test.

I looked into the logs: It appears to run the test test/integration/basic/test/index.test.js twice (initial run + retry).

Different tests fail in the two runs:
1st run: Error Recovery > 5x should recover ...
2nd run: should polyfill Node.js modules + Hot Module Reloading > editing a page > should update styles in a stateful component correctly

I ran the tests locally, twice: none fail

cd nextjs && yarn testheadless --testPathPattern "integration/basic"

Not sure, where to go from here. Any suggestion?

@flybayer
Copy link
Member

Awesome, thank you!!

And yeah, that was just a flake test.

@flybayer flybayer changed the title hide some errors from cypress so they don't fail e2e tests Fix RedirectError incorrectly failing Cypress tests Aug 18, 2021
@flybayer flybayer merged commit 99f3f83 into blitz-js:canary Aug 18, 2021
@itsdillon itsdillon changed the title Fix RedirectError incorrectly failing Cypress tests [legacy-framework] Fix RedirectError incorrectly failing Cypress tests Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RedirectError breaks Cypress tests via uncaught exception
3 participants