Files
coolify/tests/Feature/StandardTableComponentsTest.php
T
Andras BacsaiandClaude Opus 5.5 a79ee909c6 chore: remove unused components and markup-only tests
- Delete Blade components, component classes, Livewire components and
  views that nothing uses after the redesign.
- Delete tests that only compare Blade/CSS source text; keep the source
  checks for authorization gates, stable wire:key values and escaping.
- Update stale tests to the current UI and behaviour.
- Update DESIGN.md to the current navigation and layout.
- Add a lesson: test behaviour, not source markup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 00:18:16 +02:00

37 lines
1.4 KiB
PHP

<?php
use Illuminate\Support\Facades\Blade;
it('renders the standard table toolbar controls', function () {
$html = Blade::render(<<<'BLADE'
<x-table.toolbar>
<x-slot:search>
<x-table.search placeholder="Search deployments" wire:model.live="search" />
</x-slot:search>
<x-table.filter :active-count="2" reset-action="clearFilters">
<button class="listbox-option">Success</button>
</x-table.filter>
<x-table.sort>
<button class="listbox-option">Newest first</button>
</x-table.sort>
</x-table.toolbar>
BLADE);
expect($html)
->toContain('table-toolbar')
->toContain('table-search')
->toContain('wire:model.live="search"')
->not->toContain('x-teleport="body"')
->not->toContain('floatingDropdown(')
->toContain("panelStyle: 'position: fixed; min-width: 0; visibility: hidden;'")
->toContain("this.panelStyle = 'position: fixed; min-width: 0; visibility: hidden;'")
->toContain('position: fixed')
->toContain('min-width: 0')
->toContain('getBoundingClientRect()')
->toContain('x-show="open"')
->toContain('aria-multiselectable="true"')
->toContain('Reset filters')
->toContain('wire:click="clearFilters"')
->toContain('Sort');
});