mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-26 10:27:56 +00:00
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.
48 lines
1.1 KiB
PHP
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();
|
|
});
|