Repository navigation
test: update eight browser tests for full-measure thread cards and comment box - #5983
Merged
Merged
Conversation
…mment box #5846 opens every thread card and the comment box at the full measure and keeps that width as words arrive. Eight browser tests assumed the old sizing. Behaviors the tests now protect instead: - The comment box keeps its width while it grows (test_render_aim's growing comment; the caret subtest in test_chrome_contracts). - A key that takes the comment box a new line draws it in the frame the key lands. This replaces the test of a key that widened the box, which no key does now. - The rewrite pair hides the head's labels on a card narrow enough for them to meet: the card beside its words at 1440 px, 336 px wide. At 1400 px the card now stands under its words at 592 px, where the labels never reach the pair. Three tests pressed page content that the wider box or card now covers. The reader puts the card or box away first (thread URL tab test, projected-data row), or the page leaves room for the box (comment targets). Closes #5980
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.
#5846 opens every thread card and the comment box at the full measure (
--thread-card, 592 px, or the room where that is narrower), and a card "neither narrows to its words nor widens as they arrive". Eight browser tests onmainassumed the old sizing. This PR updates them to the new layout and changes no runtime code. All eight failed onmain(917a3cf25) and pass on this branch, run locally with Chromium and Firefox.Tests whose expectation #5846 replaced
test_render_aim.py::test_a_growing_text_comment_keeps_its_side_and_the_page_still[1440|390]asserted the box widens as words arrive. It now asserts the width holds while the box grows downward.test_render_aim.py::test_a_key_that_widens_the_comment_box_draws_it_at_oncedepended on a key widening the box, and no key does that now. It becomestest_a_key_that_takes_a_line_draws_the_comment_box_at_once. The guarantee from box-motion.js's "Whose change it is" stays the same: a key's change to the box is drawn in the frame the key lands. The test now reads the fill's bottom edge, not its right edge. A line taken at the window's foot already has its own test.test_chrome_contracts.py::test_a_caret_is_drawn_at_a_lines_end_and_after_a_list_bulletasserted the one-line box sits between its least and wrapped widths. All three widths are now equal. The caret checks are unchanged, at the box's full column and at a 346 px window.threads/test_rewrites.py::test_a_cards_message_controls_cover_its_headneeds a card narrow enough that the Discard/Save pair reaches the head's labels. At 1400 px the card now stands under its words at 592 px, and the labels end clear of the pair. At 1440 px it stands in the margin at 336 px and the pair covers "Queued for Indexer", so the test moves to 1440.Tests that pressed content the wider surface now covers. On #5846's parent
830e7ae45, the comment box under a one-line paragraph stood at x 654–946 in a 1200 px window. Now it starts at x 382, so it covers the start of the next paragraph. The tests now handle the surface the way a reader would:navigation/test_threads.py::test_thread_url_reveals_a_tab_despite_its_generated_display_fragmentdismisses the card with Dismiss thread view before middle-clicking the link the card covers.startup/test_projected_data.py::test_a_comment_on_an_identified_datum_follows_the_subject_across_replacementspresses Escape to put away the title's empty box before aiming at the row under it.drafts/test_comment_targets.py::test_completed_page_selection_opens_its_own_commentputs 6rem between the earlier subject and the later passages. Without it, the scroller drag ended on the box, and the words watch could not count that release as a press elsewhere.Each of these keeps #5846's intent and moves the interface no further. Covering more of the following text is a direct result of the slide #5846 chose, so this PR leaves it as designed.
Closes #5980 — automated triage