coolify/tests/Feature/DashboardNavbarLayoutTest.php

28 lines
1.1 KiB
PHP
Raw Normal View History

<?php
test('settings header navigation is replaced by the settings sidebar', function () {
$path = resource_path('views/components/dashboard/navbar.blade.php');
$contents = file_get_contents($path);
expect($contents)
->toContain("['label' => 'General', 'route' => 'settings.index', 'active' => request()->routeIs('settings.*')]")
->not->toContain("['label' => 'Email', 'route' => 'settings.email'");
});
test('dashboard navbar keeps the original side-by-side tab and actions layout', function () {
$path = resource_path('views/components/dashboard/navbar.blade.php');
$contents = file_get_contents($path);
expect($contents)
->toContain('flex w-full flex-col gap-2 sm:flex-row sm:items-center sm:justify-between')
->toContain('flex min-w-0 w-full items-center gap-0.5 overflow-x-auto');
});
test('dashboard view all links use the shared button style', function () {
$contents = file_get_contents(resource_path('views/components/section-heading.blade.php'));
expect($contents)
->toContain('class="button group"')
->not->toContain('class="group inline-flex h-7');
});