toContain("localStorage.getItem('service-compose-resources-view') || 'table'") ->toContain("setViewMode('table')") ->toContain("setViewMode('grid')") ->toContain('aria-label="Table view"') ->toContain('aria-label="Grid view"') ->toContain('mb-3 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between') ->toContain('flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-start') ->toContain("localStorage.setItem('service-compose-resources-view', mode)") ->not->toContain('>Sort') ->and($resourceCard) ->toContain("x-show=\"viewMode === 'grid'\"") ->toContain("x-show=\"viewMode === 'table'\""); }); it('directs compose application domain management to the parent service', function () { $resourceSettings = file_get_contents(resource_path('views/livewire/project/service/index.blade.php')); expect($resourceSettings) ->toContain('Manage domains, DNS checks, and redirects on the parent service') ->toContain("route('project.service.domains', \$parameters)") ->toContain('Manage domains') ->not->toContain('toContain($columns) ->and($resourceCard)->toContain($columns) ->toContain('flex flex-wrap items-center justify-end gap-1 sm:contents') ->toContain('aria-label="Resource settings"') ->toContain('aria-label="Service backups"') ->toContain("route('project.service.volume-backups.index', \$parameters)") ->not->toContain("route('project.service.database.backups'") ->not->toContain('>Settings') ->not->toContain('>Backups'); }); it('distinguishes domain management from resource settings', function () { $resourceCard = file_get_contents(resource_path('views/livewire/project/service/resource-card.blade.php')); expect($resourceCard) ->toContain('title="Manage domains" aria-label="Manage domains"') ->toContain('') ->toContain('title="Resource settings" aria-label="Resource settings"') ->not->toContain('title="Edit domains" aria-label="Edit domains"'); }); it('does not display application domains on compose resource cards', function () { $resourceCard = file_get_contents(resource_path('views/livewire/project/service/resource-card.blade.php')); expect($resourceCard) ->not->toContain('{{ $resource->fqdn }}'); });