mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-20 02:17:09 +00:00
test: add dashboard test and improve browser test coverage
- Add DashboardTest with tests for project/server visibility - Add screenshots to existing browser tests for debugging - Skip onboarding in dev mode for faster testing - Update gitignore to exclude screenshot directories
This commit is contained in:
1 parent
47a3f2e2cd
commit
6dea1ab0f3
6 files changed
+187
-10
No files matched your search
@@ -14,7 +14,8 @@ it('shows registration page when no users exist', function () {
|
||||
$page = visit('/register');
|
||||
|
||||
$page->assertSee('Root User Setup')
|
||||
->assertSee('Create Account');
|
||||
->assertSee('Create Account')
|
||||
->screenshot();
|
||||
});
|
||||
|
||||
it('can register a new root user', function () {
|
||||
@@ -25,7 +26,8 @@ it('can register a new root user', function () {
|
||||
->fill('password', 'Password1!@')
|
||||
->fill('password_confirmation', 'Password1!@')
|
||||
->click('Create Account')
|
||||
->assertPathIs('/onboarding');
|
||||
->assertPathIs('/onboarding')
|
||||
->screenshot();
|
||||
|
||||
expect(User::where('email', 'root@example.com')->exists())->toBeTrue();
|
||||
});
|
||||
@@ -38,7 +40,8 @@ it('fails registration with mismatched passwords', function () {
|
||||
->fill('password', 'Password1!@')
|
||||
->fill('password_confirmation', 'DifferentPass1!@')
|
||||
->click('Create Account')
|
||||
->assertSee('password');
|
||||
->assertSee('password')
|
||||
->screenshot();
|
||||
});
|
||||
|
||||
it('fails registration with weak password', function () {
|
||||
@@ -49,7 +52,8 @@ it('fails registration with weak password', function () {
|
||||
->fill('password', 'short')
|
||||
->fill('password_confirmation', 'short')
|
||||
->click('Create Account')
|
||||
->assertSee('password');
|
||||
->assertSee('password')
|
||||
->screenshot();
|
||||
});
|
||||
|
||||
it('shows login link when a user already exists', function () {
|
||||
@@ -58,5 +62,6 @@ it('shows login link when a user already exists', function () {
|
||||
$page = visit('/register');
|
||||
|
||||
$page->assertSee('Already registered?')
|
||||
->assertDontSee('Root User Setup');
|
||||
->assertDontSee('Root User Setup')
|
||||
->screenshot();
|
||||
});
|
||||
Reference in new issue
Block a user