Follow the search's combobox wrapper and scrim in browser tests

Plan step 32. inputs.md IN-01 moved `aria-expanded` from the raw input to
the `role="combobox"` wrapper around it, and IN-09 put a scrim under the
docked view, so a press outside lands on the scrim and Playwright could
never press the text beneath it. The tests read the wrapper and press
the scrim.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
Andreas Reinhold / reini
2026-09-14 13:39:17 +02:00
co-authored by Claude Opus 5
parent 661eabbc57
commit fe1cea4ac6
+6 -4
View File
@@ -120,10 +120,11 @@ it('opens a searchable choice\'s list above a container that clips', function ()
it('opens the search view with the results Livewire renders for the query', function () {
$view = "document.querySelector('#find-view')";
// The combobox is the wrapper around the input, which carries `aria-expanded` (inputs.md IN-01).
$page = pickProbe()
->click('#find')
->assertScript("getComputedStyle({$view}).display !== 'none'")
->assertAttribute('#find', 'aria-expanded', 'true');
->assertAttribute('[role="combobox"]:has(> #find)', 'aria-expanded', 'true');
$page->type('#find', 'con')
->assertSeeIn('#query', 'con')
@@ -135,7 +136,7 @@ it('opens the search view with the results Livewire renders for the query', func
$page->keys(':focus', 'Escape')
->assertScript("getComputedStyle({$view}).display === 'none'")
->assertScript("document.activeElement.id === 'find'")
->assertAttribute('#find', 'aria-expanded', 'false');
->assertAttribute('[role="combobox"]:has(> #find)', 'aria-expanded', 'false');
});
it('says so when nothing matches, and closes on a press outside or a chosen result', function () {
@@ -146,8 +147,9 @@ it('says so when nothing matches, and closes on a press outside or a chosen resu
->type('#find', 'zzz')
->assertSeeIn('#find-view', 'No files match.');
// The open view covers what is under it, so the press lands above it.
$page->click('#days')
// The docked view opens over a scrim that covers the rest of the page (inputs.md IN-09), so a
// press outside the view lands on the scrim.
$page->click('[data-search-scrim]')
->assertScript("getComputedStyle({$view}).display === 'none'");
$page->click('#find')