You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that results of this commands will be similar. But in case DOM changing while test running, results will be different.
I have create simple example in which results of two above commands isn't similar. I test page on which change elements count after 1.5s after page initialising. Builtin find command has expected behaviour, it retries command for a few seconds and test successfully finished. But in case custom findByCypressId don't retry elements find so test failing. Below I'm leaving Vue single file component example and cypress test, also link to simple project example.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
Current behavior
In case custom commands with previously yielded subject (prevSubject: true) should be used cy.wrap() function.
But two similars commands at the first glance in some case will give different results. For example:
and
Where
findByCypressId
is defined:I expect that results of this commands will be similar. But in case DOM changing while test running, results will be different.
I have create simple example in which results of two above commands isn't similar. I test page on which change elements count after 1.5s after page initialising. Builtin
find
command has expected behaviour, it retries command for a few seconds and test successfully finished. But in case customfindByCypressId
don't retry elements find so test failing. Below I'm leaving Vue single file component example and cypress test, also link to simple project example.Page tests:
Desired behavior
Custom command
findByCypressId("test-element")
should have same behaviour asfind("[data-cypress-id=test-element]")
.Test code to reproduce
For testing please clone and run tests in public project: https://github.com/ValeronAI/cypress-test.
Cypress Version
13.4.0
Node version
16.14.0
Operating System
macOS Ventura 13.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: