Skip to content

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

Open
@emilyrohrbough

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.type: bugtype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions