mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 18:18:29 +00:00
feat(ui): dock configuration warnings in the navigation HUD
This commit is contained in:
1 parent
feb5be3a3c
commit
8e6e2b099a
12 files changed
+130
-45
No files matched your search
@@ -102,7 +102,7 @@ it('supports timed compact popup notifications', function () {
|
||||
->not->toContain('<div x-show="!iconOnly"')
|
||||
->not->toContain(':class="iconOnly')
|
||||
->toContain('x-show="!compact"')
|
||||
->toContain("'w-[calc(100vw-2rem)] cursor-pointer sm:w-auto sm:max-w-[calc(100vw-2rem)]'");
|
||||
->toContain("'w-[calc(100vw-2rem)] max-w-sm cursor-pointer'");
|
||||
});
|
||||
|
||||
it('warns when a service has missing required environment variables', function () {
|
||||
|
||||
@@ -156,16 +156,26 @@ it('groups application lifecycle controls in an actions dropdown', function () {
|
||||
->toContain('Deploy');
|
||||
});
|
||||
|
||||
it('raises the desktop top bar while the service actions dropdown is open', function () {
|
||||
it('raises the desktop top bar while any resource dropdown is open', function () {
|
||||
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
||||
$heading = file_get_contents(resource_path('views/livewire/project/service/heading.blade.php'));
|
||||
$dropdowns = [
|
||||
resource_path('views/livewire/project/application/heading.blade.php'),
|
||||
resource_path('views/livewire/project/database/heading.blade.php'),
|
||||
resource_path('views/livewire/project/service/heading.blade.php'),
|
||||
resource_path('views/livewire/server/navbar.blade.php'),
|
||||
resource_path('views/components/applications/links.blade.php'),
|
||||
resource_path('views/components/services/links.blade.php'),
|
||||
];
|
||||
|
||||
expect($layout)
|
||||
->toContain('resourceActionsOpen: false')
|
||||
->toContain("'z-[1000]': resourceActionsOpen")
|
||||
->toContain('@resource-actions-toggled.window="resourceActionsOpen = $event.detail.open"')
|
||||
->and($heading)
|
||||
->toContain("\$dispatch('resource-actions-toggled', { open })");
|
||||
->toContain('@resource-actions-toggled.window="resourceActionsOpen = $event.detail.open"');
|
||||
|
||||
foreach ($dropdowns as $dropdown) {
|
||||
expect(file_get_contents($dropdown))
|
||||
->toContain("\$dispatch('resource-actions-toggled', { open })");
|
||||
}
|
||||
});
|
||||
|
||||
it('keeps deploy in the actions menu alongside advanced operations', function () {
|
||||
@@ -179,6 +189,28 @@ it('keeps deploy in the actions menu alongside advanced operations', function ()
|
||||
->toContain('Force deploy without cache');
|
||||
});
|
||||
|
||||
it('renders configuration warnings as navbar popovers instead of floating notifications', function () {
|
||||
$checker = file_get_contents(resource_path('views/livewire/project/shared/configuration-checker.blade.php'));
|
||||
$warning = file_get_contents(resource_path('views/components/configuration-warning.blade.php'));
|
||||
|
||||
expect($checker)
|
||||
->toContain("@teleport('#configuration-warning-hud-slot')")
|
||||
->toContain("@teleport('#configuration-warning-hud-slot-mobile')")
|
||||
->toContain('<x-configuration-warning :diff="$configurationDiff" />')
|
||||
->not->toContain('<x-popup-small position="top-right"')
|
||||
->and($warning)
|
||||
->toContain('aria-label="Configuration changes not applied"')
|
||||
->toContain('<span class="hidden text-xs font-medium lg:inline">Changes pending</span>')
|
||||
->toContain('The latest configuration has not been applied')
|
||||
->toContain('fixed top-14 left-1/2')
|
||||
->toContain('-translate-x-1/2')
|
||||
->toContain('lg:absolute lg:top-full lg:right-0 lg:left-auto')
|
||||
->toContain('lg:translate-x-0')
|
||||
->toContain('@click.outside="open = false"')
|
||||
->toContain('@keydown.escape.window="open = false"')
|
||||
->toContain("\$dispatch('open-configuration-diff')");
|
||||
});
|
||||
|
||||
it('moves application backups from the top tabs into the settings sidebar', function () {
|
||||
$heading = file_get_contents(resource_path('views/livewire/project/application/heading.blade.php'));
|
||||
$configuration = file_get_contents(resource_path('views/livewire/project/application/configuration.blade.php'));
|
||||
|
||||
@@ -63,6 +63,32 @@ it('separates the mobile sidebar from the page with a visible border', function
|
||||
expect($layout)->toContain('max-w-56 min-w-0 flex-col border-l border-neutral-200 bg-white shadow-xl dark:border-white/[0.12] dark:bg-panel');
|
||||
});
|
||||
|
||||
it('keeps the mobile navbar above floating configuration warnings', function () {
|
||||
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
||||
$popup = file_get_contents(resource_path('views/components/popup-small.blade.php'));
|
||||
|
||||
expect($layout)
|
||||
->toContain('class="relative z-[1000] lg:hidden"')
|
||||
->and($popup)->toContain('z-999');
|
||||
});
|
||||
|
||||
it('keeps compact configuration warnings the same width as their expanded state', function () {
|
||||
$popup = file_get_contents(resource_path('views/components/popup-small.blade.php'));
|
||||
|
||||
expect($popup)
|
||||
->toContain("? 'w-[calc(100vw-2rem)] max-w-sm cursor-pointer'")
|
||||
->toContain(": 'w-[calc(100vw-2rem)] max-w-sm'")
|
||||
->not->toContain('sm:w-auto');
|
||||
});
|
||||
|
||||
it('provides configuration warning slots in both desktop and mobile navbars', function () {
|
||||
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
||||
|
||||
expect($layout)
|
||||
->toContain('id="configuration-warning-hud-slot"')
|
||||
->toContain('id="configuration-warning-hud-slot-mobile"');
|
||||
});
|
||||
|
||||
it('shows the full team name in the header', function () {
|
||||
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
||||
$switcher = file_get_contents(resource_path('views/livewire/switch-team.blade.php'));
|
||||
|
||||
Reference in new issue
Block a user