-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
stage: awaiting responsePotential fix was proposed; awaiting responsePotential fix was proposed; awaiting response
Description
Current behavior
I have a test that has three aliases for three different elements. They are:
cy.contains('button', 'Start')
.as('startBtn')
cy.get('input[type="text"]')
.as('textField')
cy.contains('button', 'Reset')
.as('resetBtn')
As you can see, every alias refers to a different element.
The last assertion of my test is:
cy.get('@resetBtn')
.should('not.exist')
And this exact step fails with the following error:
AssertionError: Timed out retrying after 4000ms: Expected to find element: `input[type="text"]`, but never found it.
Desired behavior
Cypress should refer to the correct element through its alias, and the tests should pass.
Test code to reproduce
Here's a draft PR that changes a sample app and updates its test, which fails with a failure that seems to be a Cypress issue: wlsf82/live-tat-code-cov#3.
And here's the failing test result from GitHub Actions https://github.com/wlsf82/live-tat-code-cov/pull/3/checks?check_run_id=3148179864.
Cypress Version
I tried on versions 8.0.0 and 7.7.0, and the issue happens on both of them.
Other
I'm using a macOS Big Sur Version 11.5
Metadata
Metadata
Assignees
Labels
stage: awaiting responsePotential fix was proposed; awaiting responsePotential fix was proposed; awaiting response