mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 10:15:40 +00:00
feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
This commit is contained in:
1 parent
0b843bb07c
commit
8ae56587d5
497 files changed
+44045
-22630
No files matched your search
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
|
||||
test('helper trigger is a button that stops label activation', function () {
|
||||
$path = resource_path('views/components/helper.blade.php');
|
||||
$contents = file_get_contents($path);
|
||||
|
||||
expect($contents)
|
||||
->toContain('type="button"')
|
||||
->toContain('@click.prevent.stop')
|
||||
->toContain('aria-label="More information"')
|
||||
->toContain('info-helper-popup')
|
||||
->toContain('name="info-circle"')
|
||||
->not->toContain('<div x-ref="trigger" class="info-helper"');
|
||||
});
|
||||
|
||||
test('helper popup uses the redesigned raised surface styles', function () {
|
||||
$helper = file_get_contents(resource_path('views/components/helper.blade.php'));
|
||||
$utilities = file_get_contents(resource_path('css/utilities.css'));
|
||||
|
||||
expect($helper)
|
||||
->toContain('info-helper-popup')
|
||||
->toContain('x-transition:enter')
|
||||
->toContain('text-[13px] leading-5');
|
||||
|
||||
expect($utilities)
|
||||
->toContain('@utility info-helper-popup')
|
||||
->toContain('dark:bg-raised')
|
||||
->toContain('dark:border-white/10')
|
||||
->toContain('shadow-modal')
|
||||
->toContain('@utility auth-tooltip')
|
||||
->toContain('rounded-lg');
|
||||
});
|
||||
|
||||
test('listbox keeps the helper outside the label association', function () {
|
||||
$path = resource_path('views/components/forms/listbox.blade.php');
|
||||
$contents = file_get_contents($path);
|
||||
|
||||
expect($contents)
|
||||
->toContain('Keep helper outside the label')
|
||||
->toContain('<div class="mb-1.5 flex h-4 w-full items-center gap-1.5">')
|
||||
->toContain('class="mb-0! flex items-center gap-1.5 leading-4"')
|
||||
->toMatch('/<label for="\{\{ \$id \}\}-trigger"[^>]*>[\s\S]*?<\/label>\s*@if \(\$helper\)/');
|
||||
});
|
||||
|
||||
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>/');
|
||||
});
|
||||
Reference in new issue
Block a user