diff --git a/resources/views/livewire/project/service/heading.blade.php b/resources/views/livewire/project/service/heading.blade.php index e7da50c80..79899e879 100644 --- a/resources/views/livewire/project/service/heading.blade.php +++ b/resources/views/livewire/project/service/heading.blade.php @@ -188,6 +188,12 @@ class="listbox-panel top-full! left-0! right-0! mt-1! w-full! min-w-0!" role="me @endcan @else + @can('deploy', $service) + + @endcan diff --git a/tests/Feature/ResourceHeadingUnifiedNavbarTest.php b/tests/Feature/ResourceHeadingUnifiedNavbarTest.php index 330afa7ed..ce69f26ef 100644 --- a/tests/Feature/ResourceHeadingUnifiedNavbarTest.php +++ b/tests/Feature/ResourceHeadingUnifiedNavbarTest.php @@ -84,11 +84,19 @@ 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('
') + ->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 () {