Conversation
| const expectedCommand = webChannelMessage.message.command; | ||
| const response = webChannelMessage.message.data; | ||
|
|
||
| await this.page.evaluate( |
There was a problem hiding this comment.
The evaluate will run immediately but also means the page needs to be loaded (and can't be loaded after evaluation). By switching to addInitScript it's injected and run before any other scripts.
The flaky test problem that was happening is that the browser would navigate to the signin page, and already respond to the web channel message before playwright had a chance to intercept. This could be replicated locally by setting a slowmo value ~ 500ms, or by just placing a breakpoint on the respondToWebChannelMessage after the page navigation.
There was a problem hiding this comment.
I checked other tests that use this too and they still pass locally without modification, but if we see flakes in CI, then we can adjust when respondToWebChannelMessage is called in those tests too, similar to this PR
There was a problem hiding this comment.
Oh, and this is our most recent and common flaky test according to circle on nightly builds!
| target, | ||
| testAccountTracker, | ||
| }) => { | ||
| test.skip(true, 'FXA-9868'); |
There was a problem hiding this comment.
Removed this since the linked ticket is done and the test passes locally now! 👍
|
Looks like it's resolved! |
Because: * We had a skipped and flaky syncV3 test This commit: * Removes the skip on `blocked with an registered email, unregistered uid` * Fixes a race condition in `Non-Sync - no user signed into browser, no user signed in locally` which has been flaking in CI.
Because
This pull request
blocked with an registered email, unregistered uidNon-Sync - no user signed into browser, no user signed in locallywhich has been flaking in CI.Issue that this pull request solves
Closes: (FXA-7108)
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.