toContain('wire:loading.class="pointer-events-none opacity-40 blur-[2px]"')
->toContain('wire:loading.flex')
->toContain('selectServer,selectDestination,selectProject,selectEnvironment')
->toContain('Loading selection…')
->toContain('isPaletteTransitioning')
->toContain('runPaletteTransition')
->toContain('Loading…');
});
it('uses a single Alpine result renderer for every command palette result type', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
expect($view)
->not->toContain('Create mode (server-rendered path)')
->not->toContain('!$wire.isCreateMode')
->toContain("\n
not->toContain("\n
")
->toContain("\n
toContain('x-for="(result, index) in searchResults"')
->toContain('x-for="[categoryName, items] in Object.entries(groupedCreatableItems)"');
});
it('skips hidden command palette results during keyboard navigation', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
expect($view)
->toContain('filter(item => item.offsetParent !== null)');
});
it('opens the command palette without changing page scrollbar visibility', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
expect($view)
->not->toContain("document.body.style.overflow = value ? 'hidden' : ''")
->not->toContain("document.body.style.overflow = ''");
});
it('animates the command palette with tw animate utilities', function () {
$view = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
expect($view)
->toContain('toContain('x-transition:enter="animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-150"')
->toContain('x-transition:leave="animate-out fade-out-0 zoom-out-95 slide-out-to-top-2 duration-100"')
->not->toContain('