Skip to content

test(browser): judge the modal test by drawn lines and pin a merged pull request - #435

Merged
RanolP merged 1 commit into
mainfrom
claude/fix-modal-test
Oct 6, 2026
Merged

RanolP merged 1 commit into
mainfrom
claude/fix-modal-test

Conversation

@RanolP

@RanolP RanolP commented Oct 6, 2026

Copy link
Copy Markdown
Owner

The browser modal test (pnpm run test:modal in packages/browser) failed on main in both modes for reasons in the test itself, not the editor. This fixes only packages/browser/test/modal.mjs.

Fixture mode

  • expandElided failed with "Enter expanded nothing", although Enter did draw the elided run (418 -> 427 lines). The test was waiting for a host expand console call, which the fixture never makes.
  • Fix: both modes now judge Enter by the line count growing, waiting up to 15s.

Ext mode

  • The merged-row check failed with "no merged row with del, ins and shared text". The extension opens the newest commit's diffset, and on the still-open feat: support bundled dev mode in ssr vitejs/vite#21626 that commit had drifted to one file with no such row.
  • Fix: the test now opens fix(optimize-deps): avoid "unsupported" warnings for browser:false mappings vitejs/vite#23590 instead. It is merged, so its commits no longer change. Its newest commit edits one file, rolldownDepPlugin.ts, with 3 merged rows and elided runs.
  • WARN: o did not move the selection was not a bug. On an identifier, the first parent node can span exactly the same text, so one o paints the same ranges. The check now presses o up to three times; here the selection widened on the second press (exactRegex -> { exactRegex, prefixRegex }).

Verification (headless Chromium only)

  • pnpm run test:modal exits 0.
  • fixture: passed.
  • ext: passed. The merged-row step selected shared text after the second o. expandElided went from 34 to 54 lines.
  • expandMove still logs "no cross-file move on this page, skipped" in ext mode, as it did before; that step was a skip already.

🤖 Generated with Claude Code

…ull request

Fixture mode now judges Enter on an elided run by the line count
growing, as ext mode did, rather than by a host expand call the fixture
never makes. Ext mode opens vitejs/vite#23590, a merged pull request
whose newest commit keeps a row with shared text beside a del and an
ins; the open #21626 had drifted until no such row was left. The first
o check presses o up to three times, since a parent can paint exactly
its child's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RanolP
RanolP marked this pull request as ready for review October 6, 2026 09:10
@RanolP
RanolP merged commit ebfe3ad into main Oct 6, 2026
@RanolP
RanolP deleted the claude/fix-modal-test branch October 6, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant