Files
coolify/tests/Feature/SettingsSidebarStickyTest.php
T
Andras Bacsai 5842d77b81 feat(volume-backups): add service backup UI and polish layouts
Add dedicated service volume-backup Livewire pages and routes, wire
shared storage backups for services, and pass S3 trusted hosts into
MinIO resolve options. Also refine breadcrumbs, sticky sidebars,
destination/GitHub layouts, resource filters, and login recovery link.
2026-08-05 15:15:50 +02:00

36 lines
1.3 KiB
PHP

<?php
use Illuminate\Support\Facades\File;
it('uses one aligned sticky rule for all settings sidebars', function () {
$appCss = file_get_contents(resource_path('css/app.css'));
preg_match('/\.application-settings-navigation\s*\{([^}]+)\}/', $appCss, $matches);
$navigationCss = $matches[1] ?? '';
expect($navigationCss)
->toContain('align-self: start')
->toContain('position: sticky')
->toContain('top: 3.5rem')
->toContain('max-height: calc(100dvh - 4.25rem)')
->toContain('overflow-y: auto');
});
it('aligns every settings sidebar with its content without per-view top offsets', function () {
$navigationViews = collect(File::allFiles(resource_path('views')))
->filter(fn (SplFileInfo $file): bool => str_contains($file->getContents(), 'application-settings-navigation'));
expect($navigationViews)->not->toBeEmpty();
foreach ($navigationViews as $file) {
expect($file->getContents())
->not->toContain('xl:sticky')
->not->toContain('xl:top-26');
}
});
it('keeps settings card headers the same height with or without actions', function () {
$appCss = file_get_contents(resource_path('css/app.css'));
expect($appCss)->toMatch('/\.application-settings-section > :is\(header, \.application-settings-section-header\)\s*\{[^}]*min-height:\s*3rem/s');
});