mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 16:46:37 +00: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>
15 lines
689 B
PHP
15 lines
689 B
PHP
<?php
|
|
|
|
it('gates new cloud tokens and keys saved token rows by id', function () {
|
|
$view = file_get_contents(__DIR__.'/../../resources/views/livewire/security/cloud-provider-tokens.blade.php');
|
|
|
|
expect($view)->toContain("@can('create', App\\Models\\CloudProviderToken::class)")
|
|
->and($view)->toContain('wire:key="cloud-token-{{ $savedToken->id }}"');
|
|
});
|
|
|
|
it('gates the server cloud token action behind the update permission', function () {
|
|
$serverTokenView = file_get_contents(__DIR__.'/../../resources/views/livewire/server/cloud-provider-token/show.blade.php');
|
|
|
|
expect($serverTokenView)->toContain('<x-forms.button canGate="update" :canResource="$server"');
|
|
});
|