mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-24 23:40:16 -05:00
fix(service): show disabled deploy action when variables are missing
This commit is contained in:
@@ -188,6 +188,12 @@
|
||||
</div>
|
||||
@endcan
|
||||
@else
|
||||
@can('deploy', $service)
|
||||
<button type="button" class="button mb-2 w-full justify-between" disabled>
|
||||
<span>Deploy</span>
|
||||
<span class="text-xs font-normal opacity-70">Fill required variables first</span>
|
||||
</button>
|
||||
@endcan
|
||||
<a href="{{ $environmentVariablesUrl }}" {{ wireNavigate() }}
|
||||
class="mb-3 inline-flex" aria-label="Open required environment variables">
|
||||
<x-status-badge status="Required variables missing" type="error" />
|
||||
|
||||
@@ -84,11 +84,19 @@ it('docks desktop resource actions in the top bar instead of floating over conte
|
||||
|
||||
it('links the service header missing variables warning to environment variables', function () {
|
||||
$heading = file_get_contents(resource_path('views/livewire/project/service/heading.blade.php'));
|
||||
$mobileActions = str($heading)
|
||||
->after('<div class="w-full xl:hidden">')
|
||||
->before("@teleport('#resource-action-hud-slot')")
|
||||
->toString();
|
||||
|
||||
expect($heading)
|
||||
->toContain("route('project.service.environment-variables'")
|
||||
->toContain('Required variables missing')
|
||||
->toContain('href="{{ $environmentVariablesUrl }}"');
|
||||
->toContain('href="{{ $environmentVariablesUrl }}"')
|
||||
->and($mobileActions)
|
||||
->toContain('Fill required variables first')
|
||||
->toContain('disabled')
|
||||
->toContain('Deploy');
|
||||
});
|
||||
|
||||
it('places the account menu beside the desktop sidebar toggle while retaining it on mobile', function () {
|
||||
|
||||
Reference in New Issue
Block a user