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

Not handling origin change when navigating via .back/.go #23736

Open
emilyrohrbough opened this issue Sep 8, 2022 · 0 comments
Open

Not handling origin change when navigating via .back/.go #23736

emilyrohrbough opened this issue Sep 8, 2022 · 0 comments
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: bug type: unexpected behavior User expected result, but got another

Comments

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Sep 8, 2022

Current behavior

We are intercepting.back() or .go(). to determine if the origin is changing before unloading the page. This means we are not collecting the current run state (i.e. test that ran, num passes/failed/pending, current reporter state) which in turn restarts the test from the very beginning.

This is observed in our navigation tests (specifically this test). Running in open mode, and you will see it hit the test and then restart all of the tests from the top.

Desired behavior

Collect run state if we change origin: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cy/commands/navigation.ts#L1165

Test code to reproduce

Run https://github.com/cypress-io/cypress/blob/develop/packages/driver/cypress/e2e/commands/navigation.cy.js#L768

Cypress Version

10.7.0

Node version

16.14.2

Operating System

Mac

Debug Logs

No response

Other

No response

@emilyrohrbough emilyrohrbough added type: bug type: unexpected behavior User expected result, but got another labels Sep 9, 2022
@nagash77 nagash77 added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. and removed routed-to-e2e labels Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: bug type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

2 participants