mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 10:14:47 +00:00
feat(ui): align auth pages to shared shell and truncate team names
Move email verification and team invitation into x-auth.shell with shared guidance/alert patterns. Truncate long team names in the mobile header switcher so actions stay visible. Cover both with markup tests.
This commit is contained in:
1 parent
4d35c63d89
commit
8e57a9ab6b
8 files changed
+94
-57
No files matched your search
@@ -45,3 +45,28 @@ test('two factor challenge page uses the shared auth shell', function () {
|
||||
->not->toContain('bg-gray-50 dark:bg-base')
|
||||
->not->toContain('!text-5xl font-extrabold');
|
||||
});
|
||||
|
||||
test('email verification page uses the shared auth shell', function () {
|
||||
$verification = file_get_contents(resource_path('views/auth/verify-email.blade.php'));
|
||||
|
||||
expect($verification)
|
||||
->toContain('x-layout-simple')
|
||||
->toContain('x-auth.shell')
|
||||
->toContain('title="Coolify"')
|
||||
->toContain('auth-guidance')
|
||||
->toContain('block sm:inline')
|
||||
->not->toContain('<x-layout>')
|
||||
->not->toContain('md:h-screen');
|
||||
});
|
||||
|
||||
test('team invitation page uses the shared auth shell', function () {
|
||||
$invitation = file_get_contents(resource_path('views/invitation/accept.blade.php'));
|
||||
|
||||
expect($invitation)
|
||||
->toContain('x-auth.shell')
|
||||
->toContain('title="Coolify"')
|
||||
->toContain('x-auth.alert')
|
||||
->toContain('Accept invitation')
|
||||
->not->toContain('bg-gray-50 dark:bg-base')
|
||||
->not->toContain('!text-5xl font-extrabold');
|
||||
});
|
||||
@@ -40,6 +40,19 @@ it('separates the mobile sidebar from the page with a visible border', function
|
||||
expect($layout)->toContain('max-w-56 min-w-0 flex-col border-l border-neutral-200 bg-white shadow-xl dark:border-white/[0.12] dark:bg-panel');
|
||||
});
|
||||
|
||||
it('truncates long team names within the mobile header', function () {
|
||||
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
||||
$switcher = file_get_contents(resource_path('views/livewire/switch-team.blade.php'));
|
||||
|
||||
expect($layout)
|
||||
->toContain('flex min-w-0 flex-1 items-center gap-2.5')
|
||||
->toContain('size-8 shrink-0 items-center justify-center rounded-lg')
|
||||
->toContain('flex shrink-0 items-center gap-1')
|
||||
->and($switcher)
|
||||
->toContain('group/team flex h-8 min-w-0 max-w-full items-center')
|
||||
->toContain('min-w-0 truncate text-[13px]');
|
||||
});
|
||||
|
||||
it('shows section titles and descriptions above settings navigation on smaller screens', function (string $view, string $title, string $description) {
|
||||
$layout = file_get_contents(resource_path("views/components/{$view}"));
|
||||
$css = file_get_contents(resource_path('css/app.css'));
|
||||
|
||||
@@ -30,7 +30,7 @@ test('GET invitation shows landing page without accepting', function () {
|
||||
$response->assertStatus(200);
|
||||
$response->assertViewIs('invitation.accept');
|
||||
$response->assertSee($this->team->name);
|
||||
$response->assertSee('Accept Invitation');
|
||||
$response->assertSee('Accept invitation');
|
||||
|
||||
// Invitation should NOT be deleted (not accepted yet)
|
||||
$this->assertDatabaseHas('team_invitations', [
|
||||
|
||||
Reference in new issue
Block a user