Skip to content

Update four draft tests to the keys #7112 gave a draft's markup - #7123

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7120
Nov 25, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#7112 changed two keys in a draft: a line holding nothing past its markers, as a new list item does, now goes whole under Backspace (field-editor.js, "Keys at the edge of a line's shown words"), and Home stops at a line's first word. Four tests/browser tests still drove the old keys, so they failed on main from a1ac633 (run 45539313453); a pull request's CI doesn't run that tier, so #7112's own checks passed. This keeps #7112's behavior and changes only how each test reaches the state it checks:

  • test_markdown_decoration_keeps_source_editable: the marker of a continued item is changed by selecting the - and typing *, rather than by Backspace leaving - First\n .
  • test_a_caret_is_drawn_at_a_lines_end_and_after_a_list_bullet: drops the - one\n- step, a state Backspace no longer leaves; the caret ink is still checked after continuing the list and after arrows.
  • test_a_new_line_in_an_open_fence_starts_in_its_code: the retyped line types over what continuing the list inserted, instead of backspacing it away (which now removes the whole line).
  • test_a_draft_draws_a_list_as_the_message_will: ArrowLeft from the item's first word puts the caret on its marker, which Home no longer does.

Each failed before the change (the first reproduced locally with the CI message) and passes after it in Chromium and Firefox where parametrized: 6 passed, 8 subtests passed.

The same run's fifth failure, test_back_returns_to_the_card_a_later_open_in_panel_left[wide-browser], is unrelated to drafts and is tracked from #7120.

Refs #7120 — automated triage

#7112 made a line holding nothing past its markers, as a new item does, go
whole under Backspace, and made Home stop at a line's first word. Four
browser tests still drove the old keys: they deleted a continued item's
marker one character at a time, and pressed Home to put the caret on an
item's marker. They failed on main from a1ac633 (ci run 45539313453).

Each test keeps the behavior it protects and reaches it by keys that do so
under the new rule: a marker typed over the selected `-` changes the item's
marker; the caret ink is checked after continuing a list and after arrows
(the state "-" alone, which Backspace no longer leaves, is dropped); a
retyped fence line types over the continued item's marker; and ArrowLeft
from the first word puts the caret on the item's marker.

Refs #7120
@leaf-agent
leaf-agent merged commit c52f1c0 into main Nov 25, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7120 branch November 25, 2026 06:06
max-sixty pushed a commit that referenced this pull request Nov 25, 2026
…7112 gave Backspace (#7183)

`test_shift_enter_and_tab_keep_a_draft_in_the_containers_the_message_will_hold`
failed in both engines because two of its cases used Backspace in a way
#7112 changed on purpose. #7112 (`field-editor.js`, "Keys at the edge of
a line's shown words") made Backspace take a whole line that holds
nothing but its markers. The two cases still removed a new item's marker
one character at a time. Under the new keys their extra presses also
deleted the words of the item above: `b` in the nested case, `a` in the
fence case. So the missing item in the issue came from the test's own
keystrokes. The keys did what #7112 says they do. This keeps #7112's
behavior and changes only how the two cases reach the state they check,
the same way #7123 updated four `tests/browser` tests:

- **fence in an item**: `- a⏎```⏎x⏎```⏎more` → `- a\n- ```\n x\n ```\n
more`. The fence now opens on the continued item's line instead of after
a marker was erased. The check is the same: the fence's code and closing
marks stay in the item.
- **outdenting a nested item**: `1. a⏎b⏎⇥c⏎⏎d` → `1. a\n2. b\n 1. c\n3.
d`. The case nests the item with Tab instead of deleting and retyping a
marker. The check is the same: Shift+Enter on an empty nested item takes
it back out to the outer list.

The other eight cases are unchanged. The journey failed locally in
Chromium and Firefox with the issue's diff and passes after the change
(2 passed, 4 subtests passed, `--run-nightly` selection by node id).

Closes #7173 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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.

1 participant