mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-21 08:25:45 +00:00
feat(ui): expand server sidebar and extract status summary
Move proxy, sentinel, resources, and terminal into the server sidebar with nested routes and icons; extract navbar status into a shared status-summary component; add full-width service links and compact loading support.
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
<?php
|
||||
|
||||
it('uses left aligned single color status badges in the server header', function () {
|
||||
it('collapses server subsystem badges into one status summary', function () {
|
||||
$navbarView = file_get_contents(resource_path('views/livewire/server/navbar.blade.php'));
|
||||
$summaryView = file_get_contents(resource_path('views/components/server/status-summary.blade.php'));
|
||||
$badgeView = file_get_contents(resource_path('views/components/status-badge.blade.php'));
|
||||
|
||||
expect($navbarView)
|
||||
->toContain('data-testid="server-status-summary"')
|
||||
->toContain('<x-status-badge')
|
||||
->toContain('label="Proxy"')
|
||||
->toContain('label="Sentinel"')
|
||||
->toContain('as="button"')
|
||||
->toContain("wire:click='checkProxyStatus'")
|
||||
->toContain('status="Refresh"')
|
||||
->toContain('border-transparent')
|
||||
->toContain('wire:loading.attr="disabled"')
|
||||
->not->toContain('status="Refreshing..."')
|
||||
->not->toContain('justify-between')
|
||||
->not->toContain('<x-status.stopped status="Proxy Exited" noLoading />')
|
||||
->not->toContain('<x-status.running status="Sentinel In Sync" noLoading />');
|
||||
->toContain('<x-server.status-summary')
|
||||
->not->toContain('label="Proxy" status="Running"')
|
||||
->not->toContain('label="Sentinel"')
|
||||
->and($summaryView)
|
||||
->toContain("['Attention required', 'warning']")
|
||||
->toContain("['Ready', 'success']")
|
||||
->toContain('System status')
|
||||
->toContain('Refresh status')
|
||||
->toContain('<x-reicon name="chevron-down"')
|
||||
->toContain(":class=\"open && 'rotate-180'\"")
|
||||
->toContain('wire:click="checkProxyStatus"')
|
||||
->toContain('wire:loading.remove wire:target="checkProxyStatus"')
|
||||
->toContain('wire:loading.flex wire:target="checkProxyStatus"')
|
||||
->toContain('Refreshing status')
|
||||
->toContain('<x-loading compact />')
|
||||
->toContain('name="refresh" class="size-3 opacity-70"')
|
||||
->not->toContain('@click="open = false" role="menuitem"');
|
||||
|
||||
expect($badgeView)
|
||||
->not->toContain('text-neutral-500')
|
||||
|
||||
Reference in New Issue
Block a user