mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-14 16:52:45 -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>
23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?php
|
|
|
|
test('managed environment variables are ordered first', function () {
|
|
$component = file_get_contents(app_path('Livewire/Project/Shared/EnvironmentVariable/All.php'));
|
|
|
|
expect($component)
|
|
->toContain("CASE WHEN key LIKE 'SERVICE_FQDN%'")
|
|
->toMatch("/'kind' => 'managed',[\\s\\S]+?'kind' => 'hardcoded'/");
|
|
});
|
|
|
|
test('missing required environment variables are ordered before generated service variables', function () {
|
|
$component = file_get_contents(app_path('Livewire/Project/Shared/EnvironmentVariable/All.php'));
|
|
|
|
$requiredOrder = strpos($component, '$this->missingRequiredEnvironmentVariableIds($isPreview)', strpos($component, 'private function managedEnvironmentVariablesQuery'));
|
|
$generatedOrder = strpos($component, "CASE WHEN key LIKE 'SERVICE_FQDN%'", strpos($component, 'private function managedEnvironmentVariablesQuery'));
|
|
|
|
expect($requiredOrder)
|
|
->not->toBeFalse()
|
|
->toBeLessThan($generatedOrder)
|
|
->and($component)
|
|
->toContain('->filter(fn (EnvironmentVariable $environmentVariable): bool => $environmentVariable->is_really_required)');
|
|
});
|