Repository navigation
fix: improve screen-sharing e2e test stability - #696
Merged
Merged
Conversation
- Add helper functions for overlay state management (isOverlayVisible, ensureOverlayClosed, openOverlay, waitForSources) - Increase timeouts for source loading from 10s to 15s - Make each describe block independently manage overlay state - Remove unnecessary source wait from cancellation test - Add robust visibility checks with error handling - Remove misleading "displays loading message initially" test Co-authored-by: manusa <488391+manusa@users.noreply.github.com>
- Remove redundant visibility check in displays available sources test - Remove redundant overlay wait in canceling screen sharing beforeAll Co-authored-by: manusa <488391+manusa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate and fix flakiness in screen sharing tests
fix: improve screen-sharing e2e test stability
Nov 29, 2025
|
manusa
approved these changes
Nov 30, 2025
manusa
marked this pull request as ready for review
November 30, 2025 07:34
manusa
added a commit
that referenced
this pull request
Nov 30, 2025
* Initial plan * fix: improve screen-sharing e2e test stability - Add helper functions for overlay state management (isOverlayVisible, ensureOverlayClosed, openOverlay, waitForSources) - Increase timeouts for source loading from 10s to 15s - Make each describe block independently manage overlay state - Remove unnecessary source wait from cancellation test - Add robust visibility checks with error handling - Remove misleading "displays loading message initially" test Co-authored-by: manusa <488391+manusa@users.noreply.github.com> * refactor: address code review feedback - Remove redundant visibility check in displays available sources test - Remove redundant overlay wait in canceling screen sharing beforeAll Co-authored-by: manusa <488391+manusa@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: manusa <488391+manusa@users.noreply.github.com>
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.



Screen sharing E2E tests were flaky due to implicit state dependencies between nested
describeblocks. When onebeforeAllfailed (e.g., sources didn't load), subsequent blocks would fail due to unexpected overlay state.Changes
Add state management helpers at test suite level:
isOverlayVisible()- Safe visibility check with error handlingensureOverlayClosed()- Actively closes overlay if openopenOverlay()- Opens overlay and waits for visibilitywaitForSources()- Waits for sources with 15s timeout (up from 10s)Make each
beforeAllself-sufficient:Remove source dependency from cancel test - Cancellation doesn't require sources to be loaded, so that wait was removed. Cancel tests now pass independently even when
desktopCapturer.getSources()is slow.Increase timeouts for slow CI environments (10s → 15s for sources, 5s → 10s for other waits)
Remove misleading test - "displays loading message initially" was checking after sources already loaded in
beforeAllWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
product-details.mozilla.org/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-8JS8e9/settings.json --user-data /tmp/electronim-test-8JS8e9(dns block)/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-U2sGgW/settings.json --user-data /tmp/electronim-test-U2sGgW(dns block)/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-CB0DXS/settings.json --user-data /tmp/electronim-test-CB0DXS(dns block)redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --enable-crash-reporter=587d066a-7cca-41e1-a468-c4e4da4d326b,no_channel --user-data-dir=/tmp/electronim-test-8JS8e9 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12253100954382321867,14441367336904052304,262144 --enable-features=CDPScreenshotNewSurface,PdfUseShowSaveFilePicker --disable-features=AcceptCHFrame,AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,LocalNetworkAccessChecks,MediaRouter,PaintHolding,RenderDocument,ScreenA(dns block)/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-8JS8e9/settings.json --user-data /tmp/electronim-test-8JS8e9(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --enable-crash-reporter=6e7e65aa-36d5-4bcf-a67d-ee8458c72a37,no_channel --user-data-dir=/tmp/electronim-test-U2sGgW --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3380794546204715699,1712745992657695642,262144 --enable-features=CDPScreenshotNewSurface,PdfUseShowSaveFilePicker --disable-features=AcceptCHFrame,AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,LocalNetworkAccessChecks,MediaRouter,PaintHolding,RenderDocument,ScreenA(dns block)versionhistory.googleapis.com/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-8JS8e9/settings.json --user-data /tmp/electronim-test-8JS8e9(dns block)/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-U2sGgW/settings.json --user-data /tmp/electronim-test-U2sGgW(dns block)/home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron /home/REDACTED/work/electronim/electronim/node_modules/electron/dist/electron -r /home/REDACTED/work/electronim/electronim/node_modules/playwright-core/lib/server/electron/loader.js --inspect=0 --remote-debugging-port=0 /home/REDACTED/work/electronim/electronim/src/index.js --no-sandbox --disable-gpu --disable-dev-shm-usage --disable-web-security --settings-path /tmp/electronim-test-CB0DXS/settings.json --user-data /tmp/electronim-test-CB0DXS(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.