fix(ui): improve backup execution table scrolling and borders

This commit is contained in:
Andras Bacsai
2026-08-16 21:14:16 +02:00
parent bd79f4ec91
commit 866a3ab528
3 changed files with 20 additions and 8 deletions
+9 -5
View File
@@ -47,7 +47,7 @@ it('renders the backup executions empty state without a scrollable table', funct
expect($view)
->toMatch('/@if \(\$executions_count === 0\)\s*<div class="p-4">\s*<x-empty size="sm" title="No backup executions"/')
->toMatch('/@else\s*<div class="data-table deployment-table-scroll">/')
->toMatch('/@else\s*<div class="data-table deployment-table-scroll backup-executions-table-scroll">/')
->not->toContain('@forelse ($executions as $execution)');
});
@@ -58,8 +58,9 @@ it('keeps backup execution actions compact', function () {
expect($css)
->toContain('grid-template-columns: 6.5rem minmax(7rem, 0.8fr) minmax(14rem, 1.5fr) 7rem 5rem 4rem minmax(8rem, 1fr) 5rem;')
->and($view)
->toContain('<span class="bg-base sticky right-0 z-10 text-right">Actions</span>')
->toContain('class="bg-base sticky right-0 z-10 flex items-center justify-end gap-1"')
->toContain('<span class="text-right">Actions</span>')
->toContain('class="flex items-center justify-end gap-1"')
->not->toContain('sticky right-0')
->toContain('title="Download backup" aria-label="Download backup"')
->toContain('<x-reicon name="upload" class="size-3.5 rotate-180" />')
->toContain('title="Delete backup" aria-label="Delete backup"')
@@ -71,11 +72,14 @@ it('uses the compact resource table styling for backup executions', function ()
$css = file_get_contents(resource_path('css/app.css'));
expect($view)
->toContain('class="data-table deployment-table-scroll"')
->toContain('class="data-table deployment-table-scroll backup-executions-table-scroll"')
->toContain('data-table-header backup-executions-table-grid h-auto rounded-none px-4 py-2.5 text-[11px]')
->toContain('data-table-row backup-executions-table-grid min-h-14 px-4 py-2.5')
->toContain('data-table-row backup-executions-table-grid min-h-14 border-b border-neutral-200 px-4 py-2.5 dark:border-white/[0.06]')
->toContain('class="backup-execution-row"')
->toContain('flex min-h-11 items-center justify-between border-t')
->and($css)
->toMatch('/\.backup-executions-table-scroll\s*\{[^}]*overflow-x:\s*auto;/')
->toMatch('/\.backup-execution-row:last-child > \.data-table-row\s*\{[^}]*border-bottom:\s*0;/')
->toMatch('/\.backup-executions-table-grid\s*\{[^}]*gap:\s*0\.75rem;[^}]*min-width:\s*66rem;/');
});