Repository navigation
e2e: find the live editor by its document in the fold+wrap action bar test - #19444
Merged
Merged
Conversation
… 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
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
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.
Fixes #19436.
Intent
The
git_diff_guttertest "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 thebarInViewpoll 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.
barInViewnow takes the live editor fromwindow.rstudio.documents.activeEditor(), the same editor the test'sAceEditor(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