mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-14 00:33:44 -04:00
- Delete Blade components, component classes, Livewire components and views that nothing uses after the redesign. - Delete tests that only compare Blade/CSS source text; keep the source checks for authorization gates, stable wire:key values and escaping. - Update stale tests to the current UI and behaviour. - Update DESIGN.md to the current navigation and layout. - Add a lesson: test behaviour, not source markup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.2 KiB
PHP
31 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Blade;
|
|
|
|
it('aggregates preview container and health check status', function () {
|
|
$html = Blade::render('<x-status-summary status="running:unknown" title="Preview status" />');
|
|
|
|
expect($html)
|
|
->toContain('Preview status')
|
|
->toContain('Container')
|
|
->toContain('Running (no healthcheck)')
|
|
->toContain('Healthcheck')
|
|
->toContain('Not configured')
|
|
->toContain('aria-label="About unconfigured healthchecks"')
|
|
->toContain('class="relative inline-flex align-middle"')
|
|
->toContain('Traffic can still be routed to the container')
|
|
->toContain('aria-haspopup="menu"')
|
|
->toContain('right-auto! left-0!')
|
|
->toContain('w-[min(16rem,calc(100vw-1.5rem))]!');
|
|
});
|
|
|
|
it('shows degraded aggregate service status as a warning', function () {
|
|
$html = Blade::render('<x-status-summary status="degraded:unhealthy" title="Service status" container-name="Containers" />');
|
|
$summaryButton = str($html)->between('<button', '</button>')->toString();
|
|
|
|
expect($summaryButton)
|
|
->toContain('Degraded')
|
|
->toContain('bg-warning')
|
|
->not->toContain('bg-error');
|
|
});
|