Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #274 +/- ##
==========================================
+ Coverage 93.47% 93.83% +0.35%
==========================================
Files 20 21 +1
Lines 506 535 +29
Branches 87 91 +4
==========================================
+ Hits 473 502 +29
Misses 29 29
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Not needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
To make the Firefox screenshot tests less flaky. #272 made
setWindowSizewait for the viewport after a resize, but Alpha still shows the same failures: the first host in a session renders against a shorter viewport, and the second host renders at full size.The likely cause is how #272 measures the browser UI size (window size minus viewport). It measures it right before each resize. The session-start resize doesn't wait, so when IntegrationTests'
resetWindowSizeruns for the first host, Firefox can still report a short viewport. The measured UI size then comes out too big, and the wait accepts the short viewport on the first poll. This cause is assumed, not confirmed yet. It's being checked with debug logging in the dev pipeline.What changed
browser-creator.tscallsmeasureBrowserUISize. It waits until the window size and viewport read the same 3 times in a row, 100ms apart, for up to 3s. Then it stores the browser UI size for that browser. If the viewport never stabilizes, it logs a warning and stores nothing.setWindowSizeuses the stored UI size when there is one, and otherwise measures it before the resize as before. A short viewport no longer matches, so the wait keeps polling until the viewport reaches its full size.Testing
npm run build, ESLint, Prettier andtsc --noEmitpass.test/browser-ui-size.test.tscover a stable viewport, a viewport that keeps changing, and rethrowing other errors.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.