Files
coolify/tests/Feature/DangerZoneLayoutTest.php
T
Andras Bacsai 6daea93df4 style(ui): render danger zone as red card with Permanent badge
Wrap the danger-zone component in a bordered red-tinted card with
padding and dark-mode variants, align content to the top, switch the
title and description to neutral text colors, and add a "Permanent"
pill next to the title. Update the layout test to match.
2026-09-25 23:56:01 +02:00

29 lines
1.1 KiB
PHP

<?php
it('uses one shared visual treatment for all danger zone actions', function () {
$component = file_get_contents(resource_path('views/components/danger-zone.blade.php'));
expect($component)
->toContain("@props(['title'])")
->toContain('sm:flex-row sm:items-start sm:justify-between')
->toContain('rounded-lg border border-red-200 bg-red-50')
->toContain('dark:border-red-500/25 dark:bg-red-500/[0.08]')
->toContain('Permanent')
->toContain('@isset($action)');
foreach ([
'livewire/destination/show.blade.php',
'livewire/project/database/backup-edit/danger.blade.php',
'livewire/project/shared/danger.blade.php',
'livewire/project/shared/storages/volume-backups/danger.blade.php',
'livewire/server/delete.blade.php',
'livewire/source/github/change.blade.php',
'livewire/storage/show.blade.php',
'livewire/team/danger-zone.blade.php',
] as $view) {
expect(file_get_contents(resource_path('views/'.$view)))
->toContain('<x-danger-zone')
->not->toContain('rounded-lg border border-red-300 bg-red-50');
}
});