Skip to content

test: fix three browser tests for Playwright 1.65's Chromium 158 and Firefox 159 - #5830

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5826
Nov 11, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5826

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

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 main with 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 why inSeat held. 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 the lf-msg-annotation-exit animation on a transcript's head annotations. Firefox reports that scroll-driven animation's endTime as a finite number (about 30769), so CARD_AT_REST saw a motion that never ended. CARD_AT_REST and panel_settled (which had the same check) now count only animations on document.timeline. The annotation-chrome.css comment 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, and makeRoom (comment-placement.js) scrolls the document 10px to fit it. That 10px is the scrollY change. 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: carried in user-place.js counts any running animation whose endTime !== Infinity and that moves a box. A scroll-driven animation passes that check in both engines, since Chromium's percentage value is not Infinity either. 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

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
@leaf-agent
leaf-agent merged commit 8bb912e into main Nov 11, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5826 branch November 11, 2026 08:58
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.

Three browser tests fail on Playwright 1.65's engines: a diff seat's Tab, Firefox card rest at the window's foot, a page-scale wheel

1 participant