toContain('section="shared-variables"') ->toContain(':titleOnDesktop="false"'); } }); test('shared variables editor places the view toggle in the variables section title', function () { $editor = file_get_contents(resource_path('views/components/shared-variables/editor.blade.php')); expect($editor) ->toContain('') ->toContain('') ->toContain('wire:click="switch"') ->toContain('Developer view') ->toContain('Normal view') ->toMatch('/settings-section[\s\S]{0,300}[\s\S]{0,300}wire:click="switch"/') ->not->toContain('actionsInTitle'); }); test('shared variables navigation uses the standard mobile settings menu', function () { $navbar = file_get_contents(resource_path('views/components/dashboard/navbar.blade.php')); expect($navbar) ->toContain("\$stackTabsOnMobile = \$section === 'shared-variables'") ->toContain('grid grid-cols-2 gap-0.5 border-y') ->toContain("'menu-item'") ->toContain("'menu-item-active' => \$item['active']") ->toContain("\$sharedVariableIcons[\$item['label']]") ->toContain('hidden lg:flex'); }); test('shared variables table omits resource-only flag columns', function () { $editor = file_get_contents(resource_path('views/components/shared-variables/editor.blade.php')); $show = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/show.blade.php')); $css = file_get_contents(resource_path('css/app.css')); // Shared table: Name / Scope / Comment / Multiline only (no Literal, Buildtime, Runtime). expect($editor) ->toContain('env-table-grid-shared') ->toContain('>Multiline') ->not->toContain('>Literal') ->not->toContain('>Buildtime') ->not->toContain('>Runtime'); expect($show) ->toContain('env-table-grid-shared') ->toContain('$isSharedVariable'); expect($css)->toContain('.env-table-grid-shared'); });