feat(servers): separate connection and provisioning options

Group existing server connections separately from cloud provisioning and use a select for dedicated build server roles.
This commit is contained in:
Andras Bacsai committed 2026-08-10 10:09:03 +02:00
1 parent faf527d554
commit 4ba6aa3500
5 files changed
+148 -105

No files matched your search

@@ -18,3 +18,42 @@ test('provider pages only show the token action in the account panel', function
->not->toContain('new-server-token-')
->not->toContain('tokenProviderName');
});
test('server selection separates existing servers from cloud provisioning', function (string $viewPath) {
$view = file_get_contents(resource_path($viewPath));
expect($view)
->toContain('Add a server')
->toContain('IP address or domain')
->toContain('Provision a server')
->and(strpos($view, 'Add a server'))->toBeLessThan(strpos($view, 'Provision a server'));
})->with([
'new server page' => 'views/livewire/server/create.blade.php',
'onboarding' => 'views/livewire/boarding/index.blade.php',
]);
test('new server sections have vertical spacing', function () {
$view = file_get_contents(resource_path('views/livewire/server/create.blade.php'));
expect($view)->toContain('<div class="application-settings-form flex flex-col gap-6">');
});
test('server selection uses the provider logos', function () {
$newServerView = file_get_contents(resource_path('views/livewire/server/create.blade.php'));
$onboardingView = file_get_contents(resource_path('views/livewire/boarding/index.blade.php'));
expect($newServerView)
->toContain('src="https://www.vultr.com/media/logo_ondark.svg"')
->toContain("src=\"{{ asset('svgs/hetzner.svg') }}\"")
->and($onboardingView)
->toContain('src="https://www.vultr.com/media/logo_ondark.svg"')
->toContain("src=\"{{ asset('svgs/hetzner.svg') }}\"");
});
test('new server cards do not show method badges', function () {
$view = file_get_contents(resource_path('views/livewire/server/create.blade.php'));
expect($view)
->not->toContain("\n Manual\n")
->not->toContain("\n Provider\n");
});
@@ -6,7 +6,11 @@ test('server creation keeps private key actions together and advanced options co
expect($view)
->toContain('class="flex items-end gap-3"')
->toContain('<x-forms.collapsible class="mt-5 border-t border-neutral-200 pt-4 dark:border-white/[0.08]"')
->toContain('<x-forms.select id="is_build_server"')
->toContain('label="Use as a dedicated build server"')
->toContain('<option value="0">No</option>')
->toContain('<option value="1">Yes</option>')
->not->toContain('<x-forms.checkbox id="is_build_server"')
->toContain('helper="Build servers compile applications but do not host deployments. Enabling this makes the server build-only."');
});