Repository navigation
test: update three browser tests for the panel row and text-field textarea from #6383 - #6453
Conversation
…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
|
@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.
|
…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.
|
Done in a5e734d. The test now checks the editable node's value exactly on each side and still compares the remaining nodes and properties ( One correction to the expected forms: Chromium's tree gives the empty textarea no value at all, where I had expected |
#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 onmain(c865c3e99) and passes on this branch, run withuv run pytest <node id> -n 0.test_startup_continues_while_the_registry_fetch_is_heldasserted 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_buildscompared the accessibility nodes exactly. An empty textarea gives the tree no value, while CodeMirror's empty line reads'\n', and a textarea reportsinvalid: false. Those two differences are the whole failure. The textarea still matches the editor on role, name, description,editable,focusable,multiline,readonlyandrequired, 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 ignoresinvalid: falseand 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_fieldno 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 threwHierarchyRequestError. 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 theinWindowDocumentguard inwidget-upgrade.jsandleaf-element.jsis still needed. The test now focuses the field and releases focus before the drag, which brings the guarded case back.Closes #6451 — automated triage