Files
coolify/tests/v5/Browser/DashboardSmokeTest.php
T
Andras Bacsai 51ed86fe63 feat(v5): add coold restart action
Add the V5 server endpoint and UI action to restart coold over SSH with
a fresh host token, plus Flux reconnect handling and coverage for the
new backend, browser, and canvas test suites.
2026-07-06 22:30:50 +02:00

48 lines
1.1 KiB
PHP

<?php
use App\Models\InstanceSettings;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Hash;
uses(RefreshDatabase::class);
beforeEach(function () {
InstanceSettings::create(['id' => 0, 'is_sponsorship_popup_enabled' => false]);
$this->user = User::factory()->create([
'id' => 0,
'name' => 'Root User',
'email' => 'test@example.com',
'password' => Hash::make('password'),
]);
});
it('redirects guests to login', function () {
$page = visit('/v5');
$page->assertPathIs('/login')
->screenshot();
});
it('shows the dashboard canvas for an authenticated user', function () {
$this->actingAs($this->user);
$page = visit('/v5');
$page->assertSee('Deploy')
->assertSee('No applications on this canvas yet.')
->assertNoJavaScriptErrors()
->screenshot();
});
it('shows the clusters page for an authenticated user', function () {
$this->actingAs($this->user);
$page = visit('/v5/clusters');
$page->assertSee('Clusters')
->assertNoJavaScriptErrors()
->screenshot();
});