Files
coolify/tests/Feature/SettingsSidebarStickyTest.php
Andras Bacsai 2291c3fa1c feat(ui): unify team, security, and notification settings layouts
Extract shared settings-layout components and a dedicated team
danger-zone page. Enable modal editing for security resources,
polish OAuth/API-token controls, and align notification and
service configuration UI with the new navigation patterns.
2026-08-05 16:24:31 +02:00

36 lines
1.4 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: calc(3rem + 1.75rem)')
->toContain('max-height: calc(100dvh - 5.5rem)')
->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');
});