diff --git a/resources/css/app.css b/resources/css/app.css index 080d528e6..98e7d3899 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1430,8 +1430,10 @@ html[data-theme="custom"] textarea:disabled { /* Inputs & selects: recessed fill + line border (surface hierarchy) */ .application-settings-workspace .input, .application-settings-workspace .select, +.application-settings-workspace .listbox-trigger, .application-settings-form .input, -.application-settings-form .select { +.application-settings-form .select, +.application-settings-form .listbox-trigger { height: 2rem; border-radius: 8px; border-color: var(--coollabs-line); @@ -1741,7 +1743,7 @@ html[data-theme="custom"] textarea:disabled { gap: 0.5rem; width: 100%; min-width: 0; - height: 2rem; + height: 2.25rem; padding: 0 0.625rem 0 0.75rem; overflow: hidden; border-radius: 8px; diff --git a/resources/views/livewire/project/new/docker-compose.blade.php b/resources/views/livewire/project/new/docker-compose.blade.php index d683aac82..75efaaf5a 100644 --- a/resources/views/livewire/project/new/docker-compose.blade.php +++ b/resources/views/livewire/project/new/docker-compose.blade.php @@ -1,4 +1,4 @@ -
+
@@ -6,9 +6,9 @@

Docker Compose

Create a multi-container service directly from a Compose file.

- Create service + Create service
-
+
{{ data_get($repo, 'name') }} - @endforeach - + @@ -99,7 +100,7 @@

Build configuration

Choose the branch and build strategy for this application.

- Continue + Continue
diff --git a/tests/Feature/DockerComposeCreateViewTest.php b/tests/Feature/DockerComposeCreateViewTest.php new file mode 100644 index 000000000..4d21ca798 --- /dev/null +++ b/tests/Feature/DockerComposeCreateViewTest.php @@ -0,0 +1,23 @@ +toContain('class="application-settings-section-body"') + ->not->toContain('class="application-settings-section-body p-0!"'); +}); + +it('lets the Docker Compose editor use the available width', function () { + $view = file_get_contents(resource_path('views/livewire/project/new/docker-compose.blade.php')); + + expect($view) + ->toContain('class="mt-8 w-full lg:mt-3"') + ->not->toContain('max-w-[1180px]'); +}); + +it('shows a loading indicator while creating the service', function () { + $view = file_get_contents(resource_path('views/livewire/project/new/docker-compose.blade.php')); + + expect($view)->toContain(''); +}); diff --git a/tests/Feature/GithubPrivateRepositoryTest.php b/tests/Feature/GithubPrivateRepositoryTest.php index 18026b173..9884bca8c 100644 --- a/tests/Feature/GithubPrivateRepositoryTest.php +++ b/tests/Feature/GithubPrivateRepositoryTest.php @@ -105,6 +105,32 @@ describe('GitHub Private Repository Component', function () { ->assertSet('selected_repository_id', 1); }); + test('repository selection uses the shared listbox and disables loading action', function () { + fakeGithubHttp([ + ['id' => 1, 'name' => 'alpha-repo', 'owner' => ['login' => 'testuser']], + ]); + + Livewire::test(GithubPrivateRepository::class, ['type' => 'private-gh-app']) + ->call('loadRepositories', $this->githubApp->id) + ->assertSee('id="selected_repository_id-trigger"', false) + ->assertSee('wire:loading.attr="disabled"', false) + ->assertSee('wire:target="loadBranches,selected_repository_id"', false) + ->assertDontSee(' 1, 'name' => 'alpha-repo', 'owner' => ['login' => 'testuser']], + ]); + + Livewire::test(GithubPrivateRepository::class, ['type' => 'private-gh-app']) + ->call('loadRepositories', $this->githubApp->id) + ->set('branches', collect([['name' => 'main']])) + ->assertSee('type="submit"', false) + ->assertSee('wire:target="submit"', false) + ->assertSee('wire:loading.class="is-loading"', false); + }); + test('loadRepositories rejects a github app owned by another team', function () { $victimTeam = Team::factory()->create(); $victimPrivateKey = githubPrivateRepositoryTestPrivateKeyForTeam($victimTeam); diff --git a/tests/Feature/ListboxTriggerTruncationTest.php b/tests/Feature/ListboxTriggerTruncationTest.php index 939df46d8..1e9a46a19 100644 --- a/tests/Feature/ListboxTriggerTruncationTest.php +++ b/tests/Feature/ListboxTriggerTruncationTest.php @@ -14,6 +14,14 @@ test('listbox trigger styles constrain width and ellipsize long labels', functio ->toContain('white-space: nowrap;'); }); +test('listbox trigger height matches shared inputs', function () { + $css = file_get_contents(resource_path('css/app.css')); + + expect($css) + ->toMatch('/\.listbox-trigger \{[^}]*height: 2\.25rem;/s') + ->toMatch('/\.application-settings-workspace \.listbox-trigger[^}]*height: 2rem;/s'); +}); + test('listbox component uses shared trigger label truncation', function () { $html = Blade::render(<<<'BLADE'