Fix: function composition during playwright setup created a massive page.reload loop#6137
Merged
Fix: function composition during playwright setup created a massive page.reload loop#6137
Conversation
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
|
Good find! |
jacebrowning
approved these changes
Apr 3, 2025
Contributor
jacebrowning
left a comment
There was a problem hiding this comment.
I ran yarn test:playwright:electron --workers=1 e2e/playwright/native-file-menu.spec.ts on my machine.
Before: 54.65s
After: 27.86s
Incredible!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6137 +/- ##
=======================================
Coverage 85.37% 85.37%
=======================================
Files 110 110
Lines 44198 44198
=======================================
Hits 37733 37733
Misses 6465 6465
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
modeling-app-github-app bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
… massive page.reload loop (#6137) fix: prevented the largest function composition known to man
modeling-app-github-app bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
… massive page.reload loop (#6137) fix: prevented the largest function composition known to man
modeling-app-github-app bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
… massive page.reload loop (#6137) fix: prevented the largest function composition known to man
modeling-app-github-app bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
… massive page.reload loop (#6137) fix: prevented the largest function composition known to man
modeling-app-github-app bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
… massive page.reload loop (#6137) fix: prevented the largest function composition known to man
jessfraz
added a commit
that referenced
this pull request
Apr 5, 2025
* origin/main: (26 commits) attempt to import win-ca on windows (#6136) Upgrade e2e-tests windows runner from 4 cores to 8 (#6166) Follow-up fixes after bearing sample rename (#6164) Add test for #5799: "Only showing axis planes when there are no errors" (#6007) Wait for export button to make test more reliable (#6143) sketching on a mirror2d thats been extruded fixed! (#6149) Bump vite from 5.4.16 to 5.4.17 in /packages/codemirror-lang-kcl in the security group (#6150) Bump vite from 5.4.16 to 5.4.17 in the security group (#6151) Update all KCL-Samples to be more ME friendly (#6132) Shorten feedback cycle for legitimate failures (#6146) Remove the camera projection toggle from the UI (#6077) Use all available CPUs to run tests on CI (#6138) [fix] Get rid of risky useEffect in restart onboarding flow (#6133) Feature: Traditional menu actions in desktop application part II (#6030) [Bug] fix some UI friction from imports (#6139) Use scene fixture to make test more reliable on macOS (#6140) Fix: function composition during playwright setup created a massive page.reload loop (#6137) Alternative way to make appMachine spawned children type safe (#5890) [BUG] mutate ast to keep comments for pipe split ast-mod (#6128) Rename the app to Zoo Design Studio (#5974) ...
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.
Issue
We are spamming
page.reloadin electron playwright. The code created a massive function composition that would dopage.reloadthenpage.reloadetc...Fix
I check if electron exists, if electron exists do not rebind the function.
Gotcha
If it was on the 90th test in the suite, it would literally refresh the electron instance
4096before the test would actually run.Then the 91st test in the suite would refresh
4187times before it would run.Fun facts
Based on the number of tests that would run in a suite here is the size of the latest shard on main
These are the number of page refreshes that would happen.