Repository navigation
fix: expect a draft's Markdown reading in the round-trip and submit tests - #5333
Merged
Merged
Conversation
…ests #4872 made a draft read as a Markdown file: a line break inside a paragraph draws as a space, and Return or Shift+Enter after a paragraph's last words begins a new paragraph ("\n\n"). Four browser-tier tests still expected the old reading, which pull requests don't run, so they went red on main. - test_page_round_trip and the print step of test_double_clicking_a_draft_keeps_its_frame_and_selected_word read the draft body's inner text; they now expect DRAFT_DRAWN, the source with its soft break drawn as a space. test_the_draft_box_is_its_own_door, which passed only because to_have_text normalizes whitespace, reads the same constant. - The draft halves of test_submit_shortcuts_activate_the_controls_that_promise_the_action and test_touch_return_keeps_newlines_until_the_user_taps_submit expect the paragraph break Return now writes. Their comment-box halves, which keep typed breaks, are unchanged. Closes #5075
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.
The tests were stale, and the drafts themselves work as intended. #4872 made a draft read as a Markdown file. A line break inside a paragraph now draws as a space, and Return or Shift+Enter after a paragraph's last words now starts a new paragraph (
\n\n). Four browser-tier tests still expected the old reading, and because pull requests don't run that tier, they went red on main. This PR updates what those tests expect. It changes no product code.test_page_round_tripreads the draft body's text, and so does the print step oftest_double_clicking_a_draft_keeps_its_frame_and_selected_word. Both now expectDRAFT_DRAWN: the source text with its line break drawn as a space.DRAFT_TEXTstill names the source, which the editor opens on.test_the_draft_box_is_its_own_doorpassed only becauseto_have_textnormalizes whitespace. It now reads the same constant.test_submit_shortcuts_activate_the_controls_that_promise_the_actionandtest_touch_return_keeps_newlines_until_the_user_taps_submit, the draft half now expects the paragraph break that Return writes. The comment-box halves keep typed line breaks, and their expectations are unchanged.All four failed locally on main with the messages in the issue, and all five tests named above pass on this branch.
#5075 also recorded
test_a_reply_written_in_a_card_keeps_its_line_breaks_once_sent[mouse]. That failure is a layout difference in card replies, not a difference in how text is read: the sent message wraps one word earlier than the editor did. This PR doesn't address it, and #5332 tracks it.Closes #5075 — automated triage