diff --git a/.changeset/locator-reads-wrong-element.md b/.changeset/locator-reads-wrong-element.md new file mode 100644 index 0000000000..0b5388a9ad --- /dev/null +++ b/.changeset/locator-reads-wrong-element.md @@ -0,0 +1,6 @@ +--- +'e2e': minor +'@e2e-dev/web': patch +--- + +**Breaking:** `inputValue()` on a node with no value, such as a heading or a button, and `isChecked()` on a node with no checked state throw `ACTION_FAILED`, as in Playwright, instead of returning `""` and `false`. A field with no value still reads `""`, and a checkable role with no state reported still reads `false`. `uncheck()` on an ARIA `role="radio"` now clicks it, as in Playwright; a native radio still refuses. diff --git a/apps/testbed/tests/check.e2e.ts b/apps/testbed/tests/check.e2e.ts index 38dca1edd1..88dbbd39b8 100644 --- a/apps/testbed/tests/check.e2e.ts +++ b/apps/testbed/tests/check.e2e.ts @@ -59,7 +59,7 @@ test.describe('page check', { requires: ['browser'], tags: ['playwright'] }, () expect(await browser.evaluate("() => window.checkbox.getAttribute('aria-checked')")).toBe('true'); }); - test('should uncheck radio by aria role', { fail: '`uncheck` refuses a `role=radio`, where Playwright clicks it and refuses only a native radio' }, async ({ browser }) => { + test('should uncheck radio by aria role', async ({ browser }) => { await browser.goto(content(`