Skip to content

Large increase in random CI failures using Cypress after upgrading to react-router v7 #12974

@pjg

Description

@pjg

I'm using React Router as a...

library

Reproduction

https://github.com/almilo/react-router-7-ci-bug

There are no reproduction steps. Just an observation. Looking at video of failures, and corresponding code, it looks like a race condition during clicking. The code failing looks similar to this (in various places):

cy.contains('Text').should('exist')
cy.get('.class a').first().click()

The link is on the same page as the text. What happens is that Cypress executes the click, but react-router does not transition to the new path, like the click never happened.

I'm posting this mainly to see if I'm not alone with this.

System Info

react-router v7.1.4
cypress v14.0.1

Used Package Manager

npm

Expected Behavior

Not seeing random test failures.

Actual Behavior

Seeing random test failures.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions