-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
test: rewrite flaky 1244 test to no longer be flaky #28694
Conversation
The PR title should probably be |
@@ -80,5 +88,16 @@ describe('issue 1244', () => { | |||
cy.get('#dom').should('contain', 'DOM') | |||
cy.url().should('include', 'dom.html') | |||
}) | |||
*/ | |||
|
|||
it('does not strip link_parent', () => { |
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.
do we need the commented out test above?
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.
I kept the commented out test, as it's the reproduction case for #28681
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.
@cacieprins Is there more than this line that chagnes? cy.get('#dom').should('contain', 'DOM')
which we removed in a few of the other tests? Wondering if I missed it when eye-balling the differences
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.
The _parent
test elements were changed in the fixture to load empty.html
instead of dom.html
- so they would not load the cached dom.html
that does not have the cross-origin support script. The tests that used to assert that dom.html
was loaded were changed to assert that empty.html
was loaded instead.
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.
While the final test was the flaky one, previous tests relied on the same portion of the fixture, so had to be modified as well.
29 flaky tests on run #53419 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
cy.origin > withBeforeEach > passes runnable state to the secondary origin on retry |
Test Replay
|
cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron
Test | Artifacts | |
---|---|---|
... > correctly returns currentRetry |
Test Replay
|
|
... > correctly returns currentRetry |
Test Replay
|
|
... > correctly returns currentRetry |
Test Replay
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-chrome:beta
Test | Artifacts | |
---|---|---|
network stubbing > waiting and aliasing > yields the expected interception when two requests are raced |
Test Replay
|
e2e/origin/origin.cy.ts • 1 flaky test • 5x-driver-chrome:beta
Test | Artifacts | |
---|---|---|
cy.origin > withBeforeEach > passes runnable state to the secondary origin on retry |
Test Replay
|
commands/waiting.cy.js • 1 flaky test • 5x-driver-chrome:beta
Test | Artifacts | |
---|---|---|
... > errors > throws when waiting for 2nd response to route |
Test Replay
|
The first 5 flaky specs are shown, see all 17 specs in Cypress Cloud.
Review all test suite changes for PR #28694 ↗︎
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
This spec exposed odd caching behavior in Electron open mode, exacerbated by the upgrade to Electron 27. An issue was opened to address this bug, but this PR addresses the flaky test. The commented version of this test will reliably hang when Cypress attempts to perform a cross-origin
postMessage
handshake, because the browser caches a version ofdom.html
that does not have the cross-origin support script due to it being loaded in a new window viatarget=_blank
.Steps to test
Run the
issues/1244.cy.js
driver spec in open mode with Electron, and verify that the final test does not hang.How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?