From fe1cea4ac69e53566be5534350188f9c48954e42 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Mon, 14 Sep 2026 13:39:17 +0200 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- tests/Browser/PickingTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/Browser/PickingTest.php b/tests/Browser/PickingTest.php index bfd3abff..83def53b 100644 --- a/tests/Browser/PickingTest.php +++ b/tests/Browser/PickingTest.php @@ -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')