Skip to content

test_a_route_taller_than_the_map_returns_to_an_open_outline fails on main since #5637 drew the contents map in its sidebar track #5705

Closed

Description

@leaf-agent

tests/browser/widgets/test_contents_and_glosses.py::test_a_route_taller_than_the_map_returns_to_an_open_outline fails on main since #5637 (391c24622, "Draw the contents map inside its sidebar track"). It passes at its parent 119921814 and fails at 391c24622 and ec2799b1d locally with uv run pytest --run-main. It failed in each push run from 42366786261 (ec2799b1d) through 42452611077 (957cb8820).

CI reports the subtest "measuring keeps the place the reader scrolled to":

>           assert nav.evaluate("node => node.scrollTop") == 0
E           assert 1727 == 0
tests/browser/widgets/test_contents_and_glosses.py:1203

Locally, at ec2799b1d, it fails one step later, at test_contents_and_glosses.py:1214: assert 'rgba(0, 0, 0, 0)' != 'rgba(0, 0, 0, 0)'. At a 1188px window the persistent outline now has a transparent background, where the test expects an opaque one. Both readings concern the On this page nav that #5637 moved into the sidebar track. Whether the opaque background and the scroll position are guarantees #5637 meant to keep is what the repair has to decide.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 8, 2026
  2. leaf-agent commented on Nov 9, 2026

    @leaf-agent
    CollaboratorAuthor

    The test, not #5637, is out of date. #5731 updates it and changes no product code.

    • Scroll position (1727 ≠ 0): the subtest scrolled the outline by writing scrollTop = 0 from a script, which Leaf doesn't count as a reader's scroll. The page's recorded reading place therefore still named the focused last link, and the resize's restorePlace scrolled it back into view. The old fixed map escaped this as a stuck box; the in-track map doesn't. With a real wheel scroll the outline stays at 0 across both resizes, so the subtest now uses the wheel. It still fails if lf-toc reveals a focused link that was out of view.
    • Transparent background: Draw the contents map inside its sidebar track #5637 removed the outline's opaque paper on purpose, since the outline no longer covers the document. The test's gutter assertion still covers the no-overlap guarantee, so the background check is dropped.

    The test fails on current main and passed three of three runs locally after the change. #5731's review and CI are still pending. It lands through the normal review path, which closes this issue.

  3. added a commit that references this issue on Nov 9, 2026
    f8d0b55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions