Repository navigation
test: update two margin and reading tests for click-opens-in-reply - #5664
Merged
Merged
Conversation
Since #5410 a click opens a thread in its reply (`openingPart` in thread/focus.js). Two tests still expected what it replaced: - test_agent_progress_stays_on_the_thread_control clicked › in a card and then expected one Escape to close it. The click now leaves the caret in the reply, so the first Escape stands the user on the thread and the second takes the card down. The test now expects the reply focused and presses Escape before leaving the card. - test_back_returns_the_passage_chosen_between_trips[click-True-False] put its "independent paragraph" inside the commented section. A click there opens the section's thread in its reply, which takes the selection the test waits for. The paragraph now follows the section, so the section stays visible above it. No product behavior changes. Refs #5643
leaf-agent
added a commit
that referenced
this pull request
Nov 7, 2026
…opens (#5679) Two nightly journeys still expected a click to land on a thread, which #5410 replaced: a click now opens a thread in its reply (`openingPart` in `browser/runtime/thread/focus.js`). This updates both tests the same way #5664 updated the browser tests #5643 tracks. No product code changes. - **`tests/journeys/margin/test_card_placement.py::test_every_card_keeps_the_placement_rules`** (all six cases). The test opens each card by its margin marker and closed it with one Escape, so `expect(card).to_be_hidden()` timed out. Now the test checks that the caret is in the reply, then presses Escape twice: the first stands the user on the thread and the second takes the card down. - **`tests/journeys/test_render_playwright_trace.py::test_trace_comments_restore_an_exact_image_and_duplicate_named_element`**. After a click on ‹ or ›, the test expected `.lf-page-thread` to hold focus and then pressed `t`. Focus is now in the reply, where `t` would type a letter. The test now checks the reply and presses Escape, which stands the user on the thread, before it walks with `t`. Run locally with `--run-nightly`, all seven cases fail at `a02c20ff0` (#5410) and pass at its parent `3795150ae`. With this change they pass on main `ccecec2c0`. Refs #5657 — automated triage. This settles 7 of the 18 cases listed there. The other causes are linked from that issue. Co-authored-by: leaf-agent <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two of the three tests in #5643 still expected the behavior that #5410 replaced. Since #5410, a click opens a thread with the caret in its reply (
openingPartinbrowser/runtime/thread/focus.js). This PR updates those two tests and changes no product code. On current main each fails, and on this branch each passes (uv run pytest -n0over both functions, 5 cases).test_agent_progress_stays_on_the_thread_control([reduce]and[no-preference]) clicks › in a card, then expects a single Escape to close the card. Now the click leaves the caret in the reply, so the first Escape stands the user on the thread and a second one closes the card. A probe of focus after each press confirmed this. The test now expects the reply focused, presses Escape, and then leaves the card as before.test_back_returns_the_passage_chosen_between_trips[click-True-False]put its "independent paragraph" inside<section id="first">, which the first thread comments on. A click there now opens that thread in its reply, and the reply takes the selection the test waits for at#elsewhere, so it timed out. The paragraph now follows the section. The section's tail stays visible above it, which keeps the test's check that the old landing still shows.The third test,
test_a_root_summary_keeps_thread_actions_outside_its_fold[1400-True-10], is a real layout regression rather than a stale expectation. On a 298px touch card, the Next unread words that #5410 added to one-thread cards leave the summary header a 57px column. "Earlier discussion" then breaks mid-word over three lines, and the disclosure is cut to "Sho…". Fixing it means choosing between Next unread's words and the summary header's room. That choice stays open on #5643.Refs #5643 — automated triage