-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: (driver) add null check for browserRequestId
on responses for cy.wait
#28713
Conversation
5 flaky tests on run #53495 ↗︎
Details:
debug.cy.ts • 1 flaky test • app-e2e
runs.cy.ts • 1 flaky test • app-e2e
runner/sessions.ui.cy.ts • 1 flaky test • app-e2e
specs_list_e2e.cy.ts • 1 flaky test • app-e2e
specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e
Review all test suite changes for PR #28713 ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way we can add a test for this?
@AtofStryker I'm not really sure how to test this - I guess I could break the sort function out and unit test it? 😬 |
I saw you were able to reproduce it. Is it something that happens intermittently or can you reproduce it every single time? |
I am not able to reproduce it. Looks like for this person it only happens for a specific test? #28233 (comment). Others say that it happens intermittently |
@astone123 OK I read that wrong 😂 . I think its a good guess that this would fix there issue, but should be build a binary to be sure to have them test? |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
In #27806, we added sorting to the list of responses that we get in the wait command. The sorting algorithm uses the
browserRequestId
attribute to sort responses with the same aliases and return them in the order in which they were received by the browser.Sometimes this attribute isn't defined on the responses which causes us to throw an error when we call
.split
on undefined. This PR updates the sorting logic to just return the responses with the original sort order if either of the requests that we're comparing don't have abrowserRequestId
.Steps to test
I wasn't able to actually reproduce this - but adding the null check should at least make it so that we don't throw if the response doesn't have the expected properties.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?