Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
|
||
| await driver.delay(regularDelayMs); | ||
|
|
||
| await switchToNotificationWindow(driver); |
There was a problem hiding this comment.
removed deprecated method and using the correct one (no need to add the delay)
|
|
||
| // Wait for the first dapp's connect confirmation to disappear | ||
| await driver.waitUntilXWindowHandles(2); | ||
|
|
There was a problem hiding this comment.
no need to add this, as we handle the close window into the `clickElementAndWaitForWindowToClose
|
| await driver.switchToWindowWithUrl(DAPP_ONE_URL); | ||
|
|
||
| // Wait for switch confirmation to close then tx confirmation to show. | ||
| await driver.waitUntilXWindowHandles(3); |
There was a problem hiding this comment.
this point is where test breaks in webpack: if the next dialog window is opened really fast, this condition is never met
| await driver.switchToWindowWithUrl(DAPP_ONE_URL); | ||
|
|
||
| // Wait for switch confirmation to close then tx confirmation to show. | ||
| await driver.waitUntilXWindowHandles(3); |
There was a problem hiding this comment.
this point is where test breaks in webpack: if the next dialog window is opened really fast, this condition is never met
Builds ready [c1e9a64]
Page Load Metrics (1739 ± 85 ms)
Bundle size diffs
|
chloeYue
left a comment
There was a problem hiding this comment.
Looks good for me the fix ! Thanks !



Description
There is a race condition with window management that makes this test fail quite often. The test performs these actions and there are different behaviors happening, depending on the build:
Error: waitUntilXWindowHandles timed out polling window handles. Expected: 3, Actual: 4)Extra Notes:
This PR fixes the flakiness of waiting for 3 windows by adding a delay. This won't fix the root cause of the 2 new identified issues, but after re-runs has proven to stabilize the test
Since there is only a brief moment for having 3 windows, waiting for 3 windows and then proceeding also makes the test flaky, so it's not effective.
Related issues
Fixes: #27387
Manual testing steps
yarn test:e2e:single test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js --browser=chromeScreenshots/Recordings
Problem in FF and Webpack, see how popup is open and closed, and then a new popup is open with the transaction.
ff-dialog-open-close.mp4
Problem in Webpack, where tx does not open after the change networks
webpack-send-tx-not-appear.mp4
Problem Webpack, see how popup is open and closed, and then a new popup is open with the transaction.
webpack-2-txs.mp4
Pre-merge author checklist
Pre-merge reviewer checklist