diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php index c1b255f72a..5288bf6eaf 100644 --- a/resources/views/livewire/project/new/select.blade.php +++ b/resources/views/livewire/project/new/select.blade.php @@ -1,6 +1,6 @@
-
- @if ($current_step === 'type') + @if ($current_step === 'type') +
+
+ @endif @if ($current_step === 'servers') diff --git a/tests/Feature/NewResourceSelectServerScopeTest.php b/tests/Feature/NewResourceSelectServerScopeTest.php index c534877e28..a55321e0de 100644 --- a/tests/Feature/NewResourceSelectServerScopeTest.php +++ b/tests/Feature/NewResourceSelectServerScopeTest.php @@ -131,3 +131,20 @@ test('the postgresql shortcut ignores a server that is not in the server list', ->assertSet('server', null) ->assertSet('current_step', 'type'); }); + +test('the postgresql image step does not reference the resource search script it does not render', function () { + Livewire::withQueryParams([ + 'type' => 'postgresql', + 'server_id' => $this->server->id, + 'destination' => $this->defaultDestination->uuid, + ])->test(Select::class) + ->assertSet('current_step', 'select-postgresql-type') + ->assertDontSeeHtml('searchResources'); +}); + +test('the resource type step renders the resource search script with its binding', function () { + Livewire::test(Select::class) + ->assertSet('current_step', 'type') + ->assertSeeHtml('x-data="searchResources()"') + ->assertSeeHtml('function searchResources()'); +});