mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-29 01:54:37 +08: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>
24 lines
850 B
PHP
24 lines
850 B
PHP
<?php
|
|
|
|
it('renders a self-contained clipboard button for backend-provided values', function () {
|
|
$html = $this->blade('<x-copy-button value="backup/path.sql" label="Copy backup path" />');
|
|
|
|
$html->assertSee('Copy backup path')
|
|
->assertSee('backup\/path.sql', false)
|
|
->assertSee('x-data="copyButton"', false)
|
|
->assertDontSee('window.copyToClipboard', false);
|
|
});
|
|
|
|
it('disables the button when no backend value is available', function () {
|
|
$html = $this->blade('<x-copy-button :value="null" />');
|
|
|
|
$html->assertSee('disabled', false);
|
|
});
|
|
|
|
it('evaluates a resolve expression at click time instead of a static value', function () {
|
|
$html = $this->blade('<x-copy-button resolve="$wire.copyValue()" />');
|
|
|
|
$html->assertSee('await ($wire.copyValue())', false)
|
|
->assertDontSee('disabled', false);
|
|
});
|