Skip to content

e2e: find the live editor by its document in the fold+wrap action bar test - #19444

Merged
kevinushey merged 1 commit into
mainfrom
bugfix/19436-git-gutter-fold-wrap-action-bar
Nov 5, 2026
Merged

kevinushey merged 1 commit into
mainfrom
bugfix/19436-git-gutter-fold-wrap-action-bar

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Fixes #19436.

Intent

The git_diff_gutter test "keeps the action bar of a folded change when wrapping pads at the fold" (added in #19350) fails on every desktop CI platform. Make it locate the live editor in a way that does not depend on what Ace has rendered.

Approach

The test found the live editor with liveEditors(page, 'tail'), a text filter on the rendered editor. Once line 1's function is folded and soft wrap is on, the fold is padded to match the base's wrapped header, which pushes the lines after it below the view. Ace renders only the rows in view, so the editor no longer contains "tail", the locator matches nothing, and the barInView poll times out. The CI screencast frames show the Revert bar sitting inside the scroller the whole time, so the IDE is fine; the test's locator was wrong.

Running the test locally with diagnostics confirms it: right after the wrap toggle the live editor renders only its first row and the text filter matches zero editors (bar at 116-140px, scroller 99-337px), it just recovers in time on a local machine.

barInView now takes the live editor from window.rstudio.documents.activeEditor(), the same editor the test's AceEditor(page, '') drives, and measures its bar against its scroller.

The two other tests that use liveEditors(page, 'tail') keep their rendered-text filter: they pass on CI, and their views do not pad past the visible rows.

QA Notes

Test-only. npm run test:desktop-dev -- tests/panes/editor/git_diff_gutter.test.ts -g "marks added, modified, and removed lines against the index|keeps the action bar of a folded change when wrapping pads at the fold" passes locally (macOS); the CI desktop shards are the real check since the failure never reproduced locally.

Checklist

  • If this PR adds a new feature, or fixes a bug, the NEWS file has been updated: test-only, no NEWS entry
  • If this PR changes UI, screenshots have been added
  • All tests pass

… test

The test located the live editor by the "tail" text it had rendered.
Once the fold is padded for the wrapped base header, the lines after it
are below the view, and Ace renders only what is in view, so the locator
matched nothing and the action bar check timed out on CI. The bar itself
was in view the whole time.

Addresses #19436
@kevinushey kevinushey added this to the 2026.12 (Parrot Balsam) milestone Nov 5, 2026
@kevinushey
kevinushey requested a review from gtritchie November 5, 2026 18:12

@gtritchie gtritchie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (and Claude)

@kevinushey
kevinushey merged commit 11a39a3 into main Nov 5, 2026
37 checks passed
@kevinushey
kevinushey deleted the bugfix/19436-git-gutter-fold-wrap-action-bar branch November 5, 2026 18:39
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
5076 0 233 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1270 0 44 0
✅ desktop-macos 1276 0 39 0
✅ desktop-windows 1269 0 51 0
✅ server-linux 1209 0 51 1
✅ setup 48 0 32 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 788d8adc36f8a15953238060244a35743ddcf77b - Run #1977

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.

e2e: git_diff_gutter folded-change action bar test fails on all desktop platforms

2 participants