mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 20:17:05 +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,69 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Security / notifications family: mobile-only H1 on list views; actions in layer-2 nav.
|
||||
* Detail views keep the resource title on desktop.
|
||||
*/
|
||||
test('security navbar defaults to hiding the title on desktop', function () {
|
||||
$securityNavbar = file_get_contents(resource_path('views/components/security/navbar.blade.php'));
|
||||
$notificationNavbar = file_get_contents(resource_path('views/components/notification/navbar.blade.php'));
|
||||
|
||||
expect($securityNavbar)
|
||||
->toContain("'titleOnDesktop' => false")
|
||||
->toContain(':titleOnDesktop="$titleOnDesktop"');
|
||||
|
||||
expect($notificationNavbar)
|
||||
->toContain("'titleOnDesktop' => false")
|
||||
->toContain(':titleOnDesktop="$titleOnDesktop"');
|
||||
});
|
||||
|
||||
test('security list views place create actions next to the tabs not in titleActions', function () {
|
||||
$pages = [
|
||||
resource_path('views/livewire/security/private-key/index.blade.php') => [
|
||||
'New private key',
|
||||
'New key',
|
||||
'Delete unused keys',
|
||||
'Delete unused',
|
||||
],
|
||||
resource_path('views/livewire/security/cloud-tokens.blade.php') => [
|
||||
'New token',
|
||||
],
|
||||
resource_path('views/livewire/security/cloud-init-scripts.blade.php') => [
|
||||
'New script',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($pages as $path => $labels) {
|
||||
$blade = file_get_contents($path);
|
||||
|
||||
expect($blade)
|
||||
->toContain('<x-slot:actions>')
|
||||
->not->toContain('<x-slot:titleActions>');
|
||||
|
||||
foreach ($labels as $label) {
|
||||
expect($blade)->toContain($label);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('layer-2 navbar stacks tabs and actions on small screens', function () {
|
||||
$navbar = file_get_contents(resource_path('views/components/dashboard/navbar.blade.php'));
|
||||
|
||||
expect($navbar)
|
||||
->toContain('flex-col gap-2 sm:flex-row')
|
||||
->toContain('[&_.button]:whitespace-nowrap');
|
||||
});
|
||||
|
||||
test('security detail views keep the resource title on desktop', function () {
|
||||
$shows = [
|
||||
resource_path('views/livewire/security/private-key/show.blade.php'),
|
||||
resource_path('views/livewire/security/cloud-provider-token/show.blade.php'),
|
||||
resource_path('views/livewire/security/cloud-init-script/show.blade.php'),
|
||||
];
|
||||
|
||||
foreach ($shows as $path) {
|
||||
expect(file_get_contents($path))
|
||||
->toContain(':titleOnDesktop="true"')
|
||||
->toContain('<x-slot:actions>');
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user