Skip to content

Two browser tests fail since #7188 added room below a page's end: reading place in a long document, evidence close in a diff file #7212

Done

Description

@leaf-agent

#7188 (813d3262b, "Give a document's end room to rise to the window's top") broke three browser tests. They pass on its parent 14ba0041c and fail on 813d3262b and on current main c06f708f0, with the same messages each time:

  • tests/browser/navigation/test_reading_place.py::test_a_place_in_a_long_document_names_the_line_at_its_top: AttributeError: 'NoneType' object has no attribute 'startswith'. Once a line of the long #log pre scrolls to the window's top, capturePlace(...)?.quote returns nothing (line 1175).
  • tests/browser/test_render_diff_controls.py::test_evidence_close_folds_room_but_retires_controls_immediately[browser-file]: assert 37 == 559.296875 ± 1 (line 1051). After reopening, the disclosure's height is not its full height.
  • tests/browser/test_render_diff_controls.py::test_evidence_close_folds_room_but_retires_controls_immediately[firefox_browser-file]: Locator expected to be focused (line 1033).

No main ci run has completed since #7188 landed, because each push run was cancelled when the next commit replaced it. So no failure report has carried these tests yet. They showed up in #7207's test job (run), and #7207 only renames imports in these files.

The room #7188 adds below a page's end probably changes where these pages scroll to. Each test's expectation then needs weighing against #7188's intent, as tests/AGENTS.md, Failing tests, says, before choosing whether to repair the test or the behavior.

Reproduce
uv run pytest "tests/browser/navigation/test_reading_place.py::test_a_place_in_a_long_document_names_the_line_at_its_top" "tests/browser/test_render_diff_controls.py::test_evidence_close_folds_room_but_retires_controls_immediately" -q

On 14ba0041c the five cases pass. On 813d3262b and c06f708f0 three of them fail. The other two cases pass on all three commits.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    #7213 fixes all three cases. They fail on main dfde749f0 with the messages above and pass on the PR. Its CI and landing are with tend-land.

    • Reading place: this is a runtime defect that the end room exposed. scrollsAlone in reading-place.js walked up from a bounded region's body past that body to <html>. <html> now has a scroll range, so every line in the pre counted as scrolling on its own. The walk now starts below the box.
    • Evidence close: the test's setup was stale. Scrolling to the document's end now leaves the evidence wholly above the window. The test now scrolls the button after the evidence to the window's foot, the position it had before Give a document's end room to rise to the window's top, and drop the deck's held height #7188.

    The PR keeps everything #7188 intended.

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