Skip to content

Commit 2a94b1f

Browse files
committed
test: restore autofocus semantics in focused-element write tests
Remove explicit focus() calls from 'into focused element' and 'should enter emoji char into focused element' tests. These tests verify that write() targets the element with default/autofocus, not one explicitly focused via focus(). The waitForNavigation: true in beforeEach is sufficient for CI stability (confirmed by 17 consecutive green runs). focus() is kept in the hideText block where it is necessary alongside beforeEach goto() to ensure the element exists on a fresh page. Signed-off-by: winst0niuss <chumachenko.vadym@gmail.com>
1 parent 479f7de commit 2a94b1f

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

tests/unit-tests/write.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@ describe(test_name, () => {
8181
it("into focused element", async () => {
8282
const input = textBox({ id: "focused" });
8383
const text = "writing to focused input";
84-
await focus(input);
8584
await write(text);
8685
expect(await input.value()).to.equal(text);
8786
});
8887

8988
it("should enter emoji char into focused element", async () => {
9089
const input = textBox({ id: "focused" });
9190
const text = "🦘 🦡 🐨 🐯 🦁 🐮 🐷 🐽 🐸 writing to focused input";
92-
await focus(input);
9391
await write(text);
9492
expect(await input.value()).to.equal(text);
9593
});

0 commit comments

Comments
 (0)