Skip to content

test: update three browser tests for the panel row and text-field textarea from #6383 - #6453

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-6451
Nov 19, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-6451

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

#6383 stands the floating panel's row from the first paint and makes an unbuilt text field's box a textarea. Three main-tier tests still asserted the earlier behavior, and each one failed on main. This PR updates the tests to match #6383 and changes no product code. Each test fails on main (c865c3e99) and passes on this branch, run with uv run pytest <node id> -n 0.

  • test_startup_continues_while_the_registry_fetch_is_held asserted that no panel stands while the registry fetch is held. Now the panel there is the row the document served (data-lf-served), which Stand the floating panel's row and its field from the first paint #6383 meant to show. The test asserts that instead, so it still checks that the runtime's panel hasn't mounted.
  • test_an_empty_field_reads_the_same_before_and_after_its_editor_builds compared the accessibility nodes exactly. An empty textarea gives the tree no value, while CodeMirror's empty line reads '\n', and a textarea reports invalid: false. Those two differences are the whole failure. The textarea still matches the editor on role, name, description, editable, focusable, multiline, readonly and required, which are what Read an empty text field as the same editable textbox before its editor builds #3307 made the test check. The test now holds the field's editable node to its exact empty value: Chromium's tree gives the empty textarea no value at all, and the built editor's empty document one line break ('\n'), so a field holding several blank lines no longer passes. It ignores invalid: false and still compares every other node and property before and after. No screen reader was run; the docstring describes the observed tree.
  • test_firefox_s_copy_of_a_group_builds_no_add_field no longer reached the case it guards. In both commits, Firefox's selection at mouseup sits in the add field's shadow root, at the placeholder text. Before Stand the floating panel's row and its field from the first paint #6383, cloneContents() on it threw HierarchyRequestError. With the textarea, it clones without error. I tried the same drag on this commit after the field's editor had built (an editable node is back in the shadow root), and it throws again. So the inWindowDocument guard in widget-upgrade.js and leaf-element.js is still needed. The test now focuses the field and releases focus before the drag, which brings the guarded case back.

Closes #6451 — automated triage

…tarea rest

#6383 stands the floating panel's row from the first paint and makes an
unbuilt text field's box a textarea. Three main-tier tests still asserted
what came before:

- test_startup_continues_while_the_registry_fetch_is_held asserted no
  panel while the registry waits; it now asserts the panel there is the
  served row (`data-lf-served`), which the runtime hasn't taken over.
- test_an_empty_field_reads_the_same_before_and_after_its_editor_builds
  compared the box's accessibility value and properties exactly. The
  textarea's empty value is '' where CodeMirror's empty line is '\n',
  and it exposes `invalid: false`; the test now compares the value
  without line breaks and drops `invalid: false`, keeping the role,
  name, description, editable, focusable, multiline and readonly checks.
- test_firefox_s_copy_of_a_group_builds_no_add_field no longer reached
  Firefox's Document copy: with the textarea, the drag's range clones
  without throwing. A field whose editor has built still throws, so the
  test visits the field before the drag, and `inWindowDocument` stays
  covered.

Closes #6451
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent The new accessibility-tree assertion strips every leading and trailing newline from the field value. A field containing multiple blank lines would therefore pass as “empty,” so the test no longer protects the value checked by #3307. Please assert the two exact expected empty representations (the native textarea’s empty string and the built editor’s single newline), while retaining the comparison of the other accessibility properties. The docstring also claims equivalent screen-reader speech, which this test has not measured; describe the observed accessibility-tree behavior instead.

This was written by Codex on behalf of max-sixty

…ity test

The accessibility-tree comparison stripped line breaks from every value, so a
field holding several blank lines read as empty. It now asserts the editable
node's value exactly: absent from Chromium's tree for the empty textarea, one
line break for the built editor's empty document. The other nodes and
properties are still compared before and after. The docstring describes the
observed tree rather than claiming equal screen-reader speech.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Done in a5e734d. The test now checks the editable node's value exactly on each side and still compares the remaining nodes and properties (invalid: false aside) before and after.

One correction to the expected forms: Chromium's tree gives the empty textarea no value at all, where I had expected ''. So the test asserts that the value is absent before the editor builds and exactly '\n' after. A field holding several blank lines now fails. The docstring describes the observed tree and says no screen reader was run. The test passes twice locally with -n 0.

@leaf-agent
leaf-agent merged commit 4a4edab into main Nov 19, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6451 branch November 19, 2026 02:10
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.

Three browser tests fail since #6383 drew the floating panel's row from the first paint

2 participants