feat(search): preselect first result in resource picker

Add the local UI design system reference and update frontend references to it.
This commit is contained in:
Andras Bacsai
2026-08-10 15:17:26 +02:00
parent 3d64eb214a
commit 8cf22d7739
6 changed files with 718 additions and 7 deletions
@@ -33,6 +33,16 @@ it('skips hidden command palette results during keyboard navigation', function (
->toContain('filter(item => item.offsetParent !== null)');
});
it('preselects the first result in every resource selection step', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
expect($view)
->toContain('preselectFirstResult()')
->toContain("this.selectedIndex = 0;")
->toContain("results[0].focus();")
->and(substr_count($view, 'x-init="preselectFirstResult()"'))->toBe(4);
});
it('opens the command palette without changing page scrollbar visibility', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));