Files
coolify/tests/Feature/PreviewStatusSummaryTest.php
T
Andras BacsaiandClaude Opus 5.5 a79ee909c6 chore: remove unused components and markup-only tests
- 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>
2026-09-28 00:18:16 +02:00

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');
});