mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-29 01:54:37 +08:00
- 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>
37 lines
1.4 KiB
PHP
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');
|
|
});
|