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
elaichenkov opened this issue
Mar 30, 2023
· 3 comments
Assignees
Labels
E2EIssue related to end-to-end testingpkg/appThis is due to an issue in the packages/app directoryTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.type: bugv10.8.0 🐛Issue present since 10.8.0
I was able to reproduce this behavior and this is not correct behavior. Thank you for the straight-forward reproduction. I actually noticed this same behavior this week.
Issue: The reason you are seeing it log 2x is without a baseUrl set and your first cy.visit() changes top, (or if you do have baseUrl set but your visit is to a different domain), Cypress is reloading on the page.
Expected Behavior: When Cypress is reloaded mid-test, it should not re-trigger the before:spec lifecycle event.
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
It is true that with v10.7.0, the before:spec isn't emitted twice, but task-handlers are. IE. the test is re-run for all practical purposes and non-idemponent task handlers must track state somehow. It also means that #26613 isn't strictly a duplicate of this..
E2EIssue related to end-to-end testingpkg/appThis is due to an issue in the packages/app directoryTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.type: bugv10.8.0 🐛Issue present since 10.8.0
Current behavior
Cypress fires
before:spec
event twice.Desired behavior
Cypress fires all events only once
Test code to reproduce
Cypress Version
12.9.0
Node version
v16.15.0
Operating System
macOS Version 13.2.1
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: