Skip to content

Make the Versions-walk and draft-Retry test assertions able to fail - #5422

Merged
leaf-agent merged 1 commit into
mainfrom
nightly/key-surfaces-versions-walk
Nov 5, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
nightly/key-surfaces-versions-walk

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Two browser tests checked things that could not fail. This makes them check what they claim, and no behavior changes.

  • test_a_key_on_screen_is_a_key_that_works (tests/browser/navigation/test_key_surfaces.py) asserted that the command reference names neither version.later nor version.earlier. Neither id exists any more: Remove the classic chrome: the floating panel is Leaf's only chrome #3100 removed them with the classic chrome. The Versions walk the comment describes is panel.floating.versions.pick (browser/runtime/floating-panel.js), which is declared only while the Versions list stands in the menu, so the test now asserts that the reference doesn't name it.
  • The two refused-draft-save tests (tests/browser/drafts/test_draft_editing.py) say the draft "reopens with Retry", but draft_control(page, "retry", …) selects the save button, which every open editor shows. Only the button's name says Retry, and only after a refused save (draft.save's title in lf-draft.js). Both tests now assert that the accessible name contains Retry.

All three tests pass locally on the changed nodes. The Retry assertion tells the two states apart, since before a refusal the same button is named Save.

… names

Two browser tests asserted something that could not fail:

- test_a_key_on_screen_is_a_key_that_works checked that the command reference
  names neither `version.later` nor `version.earlier`, ids #3100 removed with
  the classic chrome. The Versions walk is now `panel.floating.versions.pick`,
  declared only while the Versions list stands in the menu, so the test now
  checks that the reference doesn't name that.
- The two refused-draft-save tests promise the draft "reopens with Retry", but
  `draft_control(page, "retry", ...)` selects the save button, which every open
  editor shows; only its name says Retry, and only after a refused save
  (lf-draft.js, `draft.save`'s title). They now assert the accessible name.

The behavior these protect is unchanged; the assertions now hold it.
@leaf-agent
leaf-agent merged commit 22accdd into main Nov 5, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the nightly/key-surfaces-versions-walk branch November 5, 2026 07:21
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