test(e2e): fix the project-rename flake at its root and run the suite once#443
Open
tkislan wants to merge 1 commit into
Open
test(e2e): fix the project-rename flake at its root and run the suite once#443tkislan wants to merge 1 commit into
tkislan wants to merge 1 commit into
Conversation
… once The E2E job reran all 16 spec files on any failure (a shell `until` loop), which was expensive, and the projectRename suite failed reproducibly deep in the shared VS Code run while passing in isolation. Root cause: leaveUnsavedCellEdit located the first code cell's view-line then clicked it as a separate step, so the cell re-rendering between locate and click threw a StaleElementReferenceError — far likelier when the shared instance is sluggish late in the run, where undismissed notification toasts had piled up. (My earlier retryable-setup wrapper masked this behind a misleading open-folder error; it is dropped in favour of the root fix.) - projectRename: locate and click the cell line in one retried step (from #375). - rootHooks.ts + .mocharc.js: a Mocha root afterEach dismisses notification toasts between tests so they do not accumulate across the shared instance. - e2e.yml: run the suite once (drop the until-loop whole-suite retry). Validated locally against the packaged VSIX under Xvfb, exactly as CI runs: full suite 54 passing, 0 failing, 1 pending in a single run; projectRename passes in-place (it failed 2/2 full runs before this fix). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ELgnvYGB68gTtHncpWN588
tkislan
force-pushed
the
test/e2e-flakiness
branch
from
July 18, 2026 09:03
77b6096 to
79bb170
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #443 +/- ##
===========================
===========================
🚀 New features to boost your workflow:
|
tkislan
marked this pull request as ready for review
July 19, 2026 06:36
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.
@coderabbitai ignore
Summary
Fixes the flaky
projectRenameE2E suite at its root and drops the expensive whole-suite retry. Surgical — 4 files.until … max=2shell loop ine2e.ymlthat reran all 16 spec files on any failure.projectRenamefailed reproducibly deep in the shared run but passed in a fresh instance.leaveUnsavedCellEditlocated the first code cell's.view-linethen.click()d it as a separate step; the notebook re-renders its cells on open, staling that reference before the click lands (StaleElementReferenceError) — far likelier when the shared instance is sluggish late in the run. It now locates and clicks in one retrieddriver.waitstep (the fix from feat(telemetry): add PostHog analytics for notebook usage events #375).waitForNotificationpolls every visible toast each tick, slowing later specs and overlapping the tree/menus/inputs they drive. A Mocha rootafterEach(test/e2e/rootHooks.ts, wired via.mocharc.js) now dismisses them between tests.Validation
Ran the full stack locally exactly as CI does — packaged the VSIX, downloaded test VS Code 1.111.0 + ChromeDriver, installed the built extension + the Python extension, under Xvfb:
it.skip).projectRenamepasses in-place — it failed 2/2 full runs before this fix.npm run compile-e2eclean;npm run format-fixclean.Known follow-up (not in this PR)
Running kernels/servers and global environments created by the cell-running suites are not torn down between suites. The run is green despite this now that the race is fixed, but fully isolating them means per-suite environment teardown, which re-provisions venvs and adds CI time — a separate cost/isolation decision.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ELgnvYGB68gTtHncpWN588