Repository navigation
test: follow #7442's taller margin card in five browser tests - #7512
Conversation
#7442 put a head line holding the thread's title atop the margin card and reserved its room in the comment box's frame, so every card and box frame is 33px taller and a card's actions stand on the title line. Five tests read geometry or a line from the old head: - the press that drops selected words lands on the heading, since the box under the paragraph now covers the figure's caption; - the box beside a tall target is scrolled back off the window's head first, since `m` leaves the taller frame already at the window's top; - a margin card's resolve action is checked against the thread's title line, where #7442 moved it; - the chart comments by pointer before by keyboard, since the line's card now covers the dot the pointer reads; - the growing-draft test uses a window that leaves the transcript its whole height at the cap. Before #7442 the same test fails at 530-550px windows the same way, the grid sharing the shortfall between transcript and reply. Closes #7495
|
@leaf-agent Raising the viewport from 600px to 628px in
|
…7511 The test runs at 628px, where the cap still leaves the transcript its whole height, and at 600px, the window it ran at before #7442's taller card. There the capping keystroke moves the first turn 7px (322 to 315px), so that case is marked xfail, strict, on AssertionError, and fails once #7511's fix holds the turn.
|
I split the 600px case out. In 195d984, Locally, 628px passes and 600px fails for the reason #7511 gives. With I didn't fix the card sizing in this PR. The experiment in #7511 fixes 600px, but it pins the transcript's minimum height. It still needs a cap of the card's height less the reply's minimum, a release on Send, on an emptied draft and on a change of side, and a header change. That's a core layout change, which doesn't belong in a test-only PR. #7511 stays open for it, and its fix can drop the mark. I updated the PR description to match. |
…gh it (#7516) When Escape lets go of a comment's card, Leaf moves Tab's starting point beside the reading by focusing the block on screen and blurring it in the same script ([`landAtReading`](https://github.com/max-sixty/leaf/blob/fb91cbd332c21cc564602eaa4726059e98c99400/browser/runtime/dom/focus.js#L1756-L1766)). Focus and blur are the only way the platform moves that starting point. When the block is a chart, its `focus` listener put the reader on a point, showing `g.lf-chart-at` and `circle.lf-chart-aim`, and its `blur` listener hid them again. That made two `display` writes that changed nothing, which the write watch fails at teardown. The chart now waits until the script that moved focus has finished before it reads focus (`queueMicrotask`). Focus that only passes through puts the reader on no point, and nothing is written. A Tab or click onto the chart still puts the reader on a point within the same task, before the next key arrives. The fix stays inside the chart package: Leaf's landing and the package interface are untouched. `test_escape_from_a_point_s_card_leaves_the_chart_s_ring_off` follows the steps in the issue: arrow to a line point, comment with `c`, send, then press Escape. On main it fails in Chromium and Firefox with the two unchanged writes, and with the change it passes in both. The 51 other chart tests that match focus, key, ring, step and walk also pass. `test_a_comment_takes_the_point_a_chart_s_ring_is_on` fails on main with and without this change (#7495). #7512 repairs it, and with this fix that test could go back to the line's comment first. Closes #7513 — automated triage Co-authored-by: leaf-agent <[email protected]>
…ller card (#7535) Two margin-draft journeys from #7528 fail because #7442 made every margin card 33px taller, which moved them into the short-window case #7511 already tracks. This PR changes only the tests. Each journey runs 33px taller, which gives it back the room it had before #7442. Its old window height stays as a strict `xfail` on #7511, as #7512 did for `test_a_growing_draft_under_its_words_holds_the_editor_s_top`. - **`test_continued_margin_draft_grows_below_its_first_line_after_agent_reply`** now runs at 633px. At 600px, the keystroke that brings the card's foot to the window's foot moves the reply's first line from 426px to 419.3px. - **`test_a_second_margin_reply_grows_below_the_first_line`** now runs at 673px. At 640px, the first Shift+Enter already caps the card and moves the editor's top from 514px to 509px. In both, the card's grid splits the cap's shortfall between the transcript and the reply, which is the mechanism #7511 describes. It shows at shorter windows before #7442 too. When I swept the window height on current `main`, the continued draft passed at 620px and above, and the second reply at 660px and above. Each `xfail` is strict, so it fails once a fix for #7511 holds the reply at the old height. Verification by node id on Linux Chromium: both journeys fail on `main` at `6313a6f59`. On this branch the 633px and 673px cases pass, and the 600px and 640px cases xfail with the same `AssertionError`. The rest of #7528 is not covered here: card placement, the responsive-layout draft, the thread walk and the long text document. Part of #7528 — automated triage Co-authored-by: leaf-agent <[email protected]>
#7442 added a head line with the thread's title to the top of the margin card, and the comment box's frame reserves the same room. Since then every card and box frame is 33px taller, and a card's actions sit on the title line. All nine failures in #7495 come from tests that read geometry or a line from the old head. None is a defect #7442 introduced, so this PR changes only tests:
test_a_press_that_drops_the_selected_words_takes_c_from_their_field: the box under the selected paragraph now covers the figure's caption (field 257–301px, caption middle 276px), so the "press elsewhere" landed on the box. It presses and drags on the heading instead.test_the_box_beside_a_tall_target_waits_at_the_window_s_top_through_a_scroll(4 cases):mbrings the ask to y=22. The taller frame was then already clamped at the window's top (8px), so the scroll had nowhere to take it (assert 8 < 8). The test scrolls back 100px first.test_pending_messages_stay_readable_through_admission[composer-panel]: on a margin card the resolve action now sits on the title line rather than beside the first message's name. That is Head a margin card with its thread's title, and let each message's name scroll with it #7442's intent, so the check reads the title line there. The inline thread keeps the old check.test_a_comment_takes_the_point_a_chart_s_ring_is_on(Chromium, Firefox): the card opened by the line's comment now covers the dot the pointer has to read. The pointer comments come first and the keyboard comment last, which keeps every step. I didn't close the card with Escape: the chart then reports an unchangeddisplaywrite on its ring and aim, a separate chart defect that Closing a chart comment's card with Escape writes an unchanged display on the chart's reading and aim #7513 tracks.test_a_growing_draft_under_its_words_holds_the_editor_s_top: the test now runs at two window heights. At 628px the cap still leaves the transcript its whole height, and the reply holds. At 600px, the window it ran at before, Head a margin card with its thread's title, and let each message's name scroll with it #7442's 33px-taller card makes the capping keystroke move the first message 7px (322→315px), because the card's grid splits the cap's shortfall between transcript and reply. That case is markedxfail(strict=True, raises=AssertionError)on Margin card under its words moves its first message when a growing draft caps it in a short window #7511, so it fails as soon as a fix holds the turn there. The same shift shows at 540–550px before Head a margin card with its thread's title, and let each message's name scroll with it #7442.The nine failing cases fail on current
main, and on this branch all ten pass, with the 600px draft case as the expected failure (uv run pytest -n 3over the five node ids). I also reran the placeholder, chart and draft tests on either side of #7442: they pass atbfd1b7b75~1and fail atbfd1b7b75.Closes #7495 — automated triage