Skip to content

fix: expect a draft's Markdown reading in the round-trip and submit tests - #5333

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5075
Nov 4, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5075

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

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_trip reads the draft body's text, and so does the print step of test_double_clicking_a_draft_keeps_its_frame_and_selected_word. Both now expect DRAFT_DRAWN: the source text with its line break drawn as a space. DRAFT_TEXT still names the source, which the editor opens on. test_the_draft_box_is_its_own_door passed only because to_have_text normalizes whitespace. It now reads the same constant.
  • In test_submit_shortcuts_activate_the_controls_that_promise_the_action and test_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

…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
@leaf-agent
leaf-agent merged commit 63bed1d into main Nov 4, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5075 branch November 4, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Draft round-trip and submission assertions disagree on line breaks

1 participant