mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 18:23:40 +00:00
fix(server): keep resources nav active and show tab loading
Use $activeMenu for Resources so Livewire updates do not clear the sidebar highlight, and disable managed/unmanaged tabs with spinners while containers load.
This commit is contained in:
@@ -55,3 +55,13 @@ test('unmanaged container names use the same typeface as managed resource names'
|
||||
->toContain('min-w-0 truncate text-[12px] font-medium text-neutral-950 dark:text-fg')
|
||||
->not->toContain('truncate font-mono text-[12px] text-neutral-950 dark:text-fg');
|
||||
});
|
||||
|
||||
test('server resource tabs show a loading state while switching', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/server/resources.blade.php'));
|
||||
|
||||
expect(substr_count($view, 'wire:loading.attr="disabled" wire:target="loadManagedContainers,loadUnmanagedContainers"'))
|
||||
->toBe(2)
|
||||
->and($view)
|
||||
->toContain('<x-loading-on-button wire:loading wire:target="loadManagedContainers" />')
|
||||
->toContain('<x-loading-on-button wire:loading wire:target="loadUnmanagedContainers" />');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user