test(browser): cover resource settings persistence

This commit is contained in:
Andras Bacsai committed 2026-02-25 19:26:55 +01:00
1 parent f09bbb4a04
commit 37eac11df3
8 files changed
+294 -153

No files matched your search

+4 -13
View File
@@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Hash;
uses(RefreshDatabase::class);
beforeEach(function () {
InstanceSettings::create(['id' => 0]);
InstanceSettings::create(['id' => 0, 'is_sponsorship_popup_enabled' => false]);
$this->user = User::factory()->create([
'id' => 0,
@@ -99,15 +99,6 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
]);
});
function loginAndSkipOnboarding(): mixed
{
return visit('/login')
->fill('email', 'test@example.com')
->fill('password', 'password')
->click('Login')
->click('Skip Setup');
}
it('redirects to login when not authenticated', function () {
$page = visit('/');
@@ -128,7 +119,7 @@ it('shows onboarding after first login', function () {
});
it('shows dashboard after skipping onboarding', function () {
$page = loginAndSkipOnboarding();
$page = loginAndSkipBoarding();
$page->assertSee('Dashboard')
->assertSee('Your self-hosted infrastructure.')
@@ -136,7 +127,7 @@ it('shows dashboard after skipping onboarding', function () {
});
it('shows all projects on dashboard', function () {
$page = loginAndSkipOnboarding();
$page = loginAndSkipBoarding();
$page->assertSee('Projects')
->assertSee('My first project')
@@ -149,7 +140,7 @@ it('shows all projects on dashboard', function () {
});
it('shows servers on dashboard', function () {
$page = loginAndSkipOnboarding();
$page = loginAndSkipBoarding();
$page->assertSee('Servers')
->assertSee('localhost')