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>
22 lines
874 B
PHP
22 lines
874 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Blade;
|
|
|
|
test('helper popup renders when the component is used next to a listbox label', function () {
|
|
$html = Blade::render(<<<'BLADE'
|
|
<x-forms.listbox id="serverTimezone" label="Server timezone"
|
|
helper="Used for backup schedules." :options="[
|
|
['value' => 'UTC', 'label' => 'UTC'],
|
|
]" :wire="false" value="UTC" />
|
|
BLADE);
|
|
|
|
expect($html)
|
|
->toContain('Server timezone')
|
|
->toContain('Used for backup schedules.')
|
|
->toContain('type="button"')
|
|
->toContain('aria-label="More information"')
|
|
->toContain('serverTimezone-trigger')
|
|
// Helper button must not be nested inside the label[for=trigger] element.
|
|
->not->toMatch('/<label[^>]*for="serverTimezone-trigger"[^>]*>[\s\S]*aria-label="More information"[\s\S]*<\/label>/');
|
|
});
|