Repository navigation
test: fix three browser tests for Playwright 1.65's Chromium 158 and Firefox 159 - #5830
Merged
Merged
Conversation
The diff seat's Tab test left the reply field wholly under the pinned file name, so the Tab let go of it (keyboard/controller.js) and moved on from the line read below the seat. Chromium 156 wrapped that Tab back to the first tab stop in the diff's shadow tree. Chromium 158 moves on to the next stop in the document, as sequential navigation should. The test now leaves the field's foot in view, so Tab moves from the field onto the dictate control beside it. That control starts under the pinned name, and the test asserts the browser's focus scroll brings it out. Firefox 159 supports view timelines, so it now runs the head annotations' scroll-driven exit animation and gives it a finite end time. CARD_AT_REST and panel_settled now count only animations on the document's clock as motion. Chromium 158 pans the visual viewport at page scale by the wheel's unscaled delta, so 120px moved it 120px where it had moved 75px. At that distance the card moves and makeRoom scrolls the document. The tablet test now wheels 75px. Closes #5826
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.
All three failures in #5826 come from changes in Playwright 1.65's browsers, not from Leaf code. In each case the test relied on the older engine's behavior. Each test now asserts its intended behavior in a way both engines agree on. All four cases fail on
mainwith Playwright 1.65 and pass on this branch. The diff test and the tablet wheel test also pass under Playwright 1.64.1's Chromium 156.test_diffs.py::test_tab_onto_a_seat_under_the_pinned_file_name_brings_it_out. The setup left the reply field entirely under the pinned file name. Focusing the field opens it, it grows from 24px to 37px, and the page scrolls 25px. The test predates the let-go rule (keyboard/controller.js; the user chose it on 2026-11-04): Tab lets go of a field the user can't see and moves on from the line they read below the seat. On Chromium 156, that Tab wrapped back to the first tab stop in the diff's shadow tree, the seat's Resolve button. That is whyinSeatheld. Chromium 158 moves on to the next tab stop in the document instead (the floating panel's leaf button), which is what sequential navigation should do. A plain page shows the same difference. The test now places the open field with its foot in view, so Tab moves from the field onto the dictate control beside it. It checks that the control starts under the pinned name and that the browser's focus scroll brings it out. That is what Let a landing read the headers over a box that scrolls only sideways #3217 added the test to protect.test_card_reply.py, the two[firefox_browser]cases. Firefox 159 supports view timelines (CSS.supports('animation-timeline: view()')is false on Firefox 157), so it now runs thelf-msg-annotation-exitanimation on a transcript's head annotations. Firefox reports that scroll-driven animation'sendTimeas a finite number (about 30769), soCARD_AT_RESTsaw a motion that never ended.CARD_AT_RESTandpanel_settled(which had the same check) now count only animations ondocument.timeline. Theannotation-chrome.csscomment that said Firefox lacks view timelines is updated.test_a_thread_card_reply_stays_in_the_visible_viewport[tablet]. At page scale 1.6, Chromium 156 panned the visual viewport 75px for a 120px wheel; Chromium 158 pans it 120px. At 120px the card moves, andmakeRoom(comment-placement.js) scrolls the document 10px to fit it. That 10px is thescrollYchange. The browser itself still scrolls nothing the document hears. The test now wheels 75px, the pan the test was written against.One related spot I left alone:
carriedinuser-place.jscounts any running animation whoseendTime !== Infinityand that moves a box. A scroll-driven animation passes that check in both engines, since Chromium's percentage value is notInfinityeither. It only matters when focus sits inside a head annotation, and a focused annotation is excluded from the animation. So I have not changed runtime code here.Closes #5826 — automated triage