mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 10:18:20 +00:00
fix(ui): polish create flows and terminal navigation
Open the global terminal outside Livewire navigation, clarify that image tag and SHA256 digest are mutually exclusive, inset the GitLab empty state, and show loading on Dockerfile create. Add regression tests.
This commit is contained in:
1 parent
c07f66cb5e
commit
fff83884da
9 files changed
+62
-12
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
it('shows that image tag and digest are mutually exclusive', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/new/docker-image.blade.php'));
|
||||
|
||||
expect($view)
|
||||
->toContain('aria-label="Tag and SHA256 digest are mutually exclusive"')
|
||||
->toContain('>OR</span>');
|
||||
});
|
||||
@@ -46,6 +46,12 @@ beforeEach(function () {
|
||||
});
|
||||
|
||||
describe('GitLab App authorization', function () {
|
||||
test('empty gitlab app state is inset from the section edges', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/new/gitlab-private-repository.blade.php'));
|
||||
|
||||
expect($view)->toContain("<div class=\"application-settings-section-body\">\n <x-empty title=\"No GitLab Apps\"");
|
||||
});
|
||||
|
||||
test('unrelated users cannot inspect system-wide source secrets in the component payload', function () {
|
||||
$otherTeam = Team::factory()->create();
|
||||
$systemWideSource = GitlabApp::create([
|
||||
|
||||
@@ -15,6 +15,18 @@ it('renders the resource terminal shell while containers are discovered', functi
|
||||
->not->toContain('<x-loading text="Loading containers" />');
|
||||
});
|
||||
|
||||
it('provides opt-in diagnostics for connected terminal theme changes', function () {
|
||||
$terminalClient = file_get_contents(resource_path('js/terminal.js'));
|
||||
|
||||
expect($terminalClient)
|
||||
->toContain('terminal-debug')
|
||||
->toContain("'[Terminal Theme] Applying theme'")
|
||||
->toContain("'[Terminal Theme] Theme applied'")
|
||||
->toContain('requestedTheme: themeName')
|
||||
->toContain('shellTheme: shell?.dataset.consoleTheme')
|
||||
->toContain("getComputedStyle(shell, '::before').background");
|
||||
});
|
||||
|
||||
it('starts a single discovered resource container without waiting for a missed browser event', function () {
|
||||
$terminalComponent = file_get_contents(app_path('Livewire/Project/Shared/ExecuteContainerCommand.php'));
|
||||
$terminalView = file_get_contents(resource_path('views/livewire/project/shared/execute-container-command.blade.php'));
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
it('shows a loading indicator while creating the application', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/new/simple-dockerfile.blade.php'));
|
||||
|
||||
expect($view)->toContain('<x-forms.button type="submit" wire:target="submit" isHighlighted>');
|
||||
});
|
||||
@@ -54,6 +54,15 @@ it('uses the same padded themed canvas for the active terminal session', functio
|
||||
->toMatch('/\.terminal-session-panel\s*\{[^}]*box-shadow:\s*none;/s');
|
||||
});
|
||||
|
||||
it('opens the global terminal outside Livewire navigation like resource terminals', function () {
|
||||
$navbar = file_get_contents(resource_path('views/components/navbar.blade.php'));
|
||||
|
||||
expect($navbar)
|
||||
->toContain('<a title="Terminal"')
|
||||
->toContain('href="{{ route(\'terminal\') }}"')
|
||||
->not->toMatch('/<a title="Terminal"[^>]*wireNavigate\(\)/s');
|
||||
});
|
||||
|
||||
it('uses floating rounded controls instead of the legacy terminal header bar', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/terminal/index.blade.php'));
|
||||
|
||||
|
||||
Reference in new issue
Block a user