Skip to content

test: pass scroll_settled a selector and compare a fulfilled JSON body as JSON, for Playwright 1.65 - #5824

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

leaf-agent merged 1 commit into
mainfrom
fix/issue-3985-playwright-165

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Playwright 1.65 (#5803) broke three tests on main in two ways, both on the test side. Each test fails on current main and passes with this change.

  • Locator arguments. Playwright 1.65's Python serializer now refuses a Locator inside an arg (Attempting to serialize unexpected value at position "[0]": <Locator …>). scroll_settled takes a selector string, and two callers passed it a Locator: test_executable_revision_keeps_a_reader_who_scrolled_away_from_their_reply and the journey test_refused_reply_retains_its_live_foot[nested-end]. Both now pass their scroller's selector, so the wait reads the scroller they meant to wait on.
  • Compact JSON from route.fulfill(json=...). The recorded body is now {"error":"Release unavailable"}, without the space json.dumps adds. test_sample_release_failure_records_the_retired_allocation[json] now compares that body to the fulfilled value as parsed JSON. The behavior it protects, that a failed release records the server's body, is unchanged. The teardown error in the same test (an unconsumed 503) followed from the failed assertion, which stopped the test before it consumed the 503.

The browser test failed in every push run on main from 42905655276 (a369d1f4c) on. That is the first push run after #5803, and the journey runs only nightly.

The same journey's [margin] case also fails under Playwright 1.65, on main and on this head alike. This change doesn't touch that case, and it has a different cause: the shift-watch allowance no longer recognises the margin card's moved reply field. #5829 tracks it.

Refs #3985 — automated triage

…y as JSON, for Playwright 1.65

Playwright 1.65 (#5803) changed two things these tests relied on:

- Its Python serializer now refuses a Locator inside an `arg`. Two callers handed
  `scroll_settled` a Locator where it takes a selector string, so
  `test_executable_revision_keeps_a_reader_who_scrolled_away_from_their_reply`
  and the journey `test_refused_reply_retains_its_live_foot[nested-end]` now raise.
  Each passes its scroller's selector instead, so the wait reads that scroller.
- `route.fulfill(json=...)` now writes compact JSON, so
  `test_sample_release_failure_records_the_retired_allocation[json]` compares the
  recorded body to the fulfilled value as parsed JSON rather than to
  `json.dumps`'s spacing. The behavior it protects, that a failed release records
  the server's body, is unchanged.

Refs #3985
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