fix tests

This commit is contained in:
Saeed Vaziry 2024-03-27 13:32:25 +01:00
parent b6179d6693
commit c66c50835a
22 changed files with 29 additions and 8 deletions

View File

@ -10,7 +10,9 @@ final class Database
const MYSQL80 = 'mysql80';
const MARIADB = 'mariadb';
const MARIADB103 = 'mariadb103';
const MARIADB104 = 'mariadb104';
const POSTGRESQL12 = 'postgresql12';

View File

@ -0,0 +1 @@
@include("services.partials.unit-actions")

View File

@ -0,0 +1 @@
@include("services.partials.unit-actions")

View File

@ -23,7 +23,7 @@ public function test_visit_application()
'site' => $this->site,
])
)
->assertOk()
->assertSuccessful()
->assertSee($this->site->domain);
}
@ -88,7 +88,7 @@ public function test_deploy(): void
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee('test commit message');
$deployment = $this->site->deployments()->first();

View File

@ -15,6 +15,7 @@ public function test_see_console(): void
$this->actingAs($this->user);
$this->get(route('servers.console', $this->server))
->assertSuccessful()
->assertSeeText('Headless Console');
}

View File

@ -22,6 +22,7 @@ public function test_see_cronjobs_list()
]);
$this->get(route('servers.cronjobs', $this->server))
->assertSuccessful()
->assertSeeText($cronjob->frequencyLabel());
}

View File

@ -98,6 +98,7 @@ public function test_see_backups_list(): void
]);
$this->get(route('servers.databases.backups', [$this->server, $backup]))
->assertSuccessful()
->assertSee($backup->database->name);
}

View File

@ -66,6 +66,7 @@ public function test_see_databases_list(): void
]);
$this->get(route('servers.databases', $this->server))
->assertSuccessful()
->assertSee($database->name);
}

View File

@ -58,6 +58,7 @@ public function test_see_database_users_list(): void
]);
$this->get(route('servers.databases', $this->server))
->assertSuccessful()
->assertSee($databaseUser->username);
}

View File

@ -41,6 +41,7 @@ public function test_see_firewall_rules(): void
]);
$this->get(route('servers.firewall', $this->server))
->assertSuccessful()
->assertSee($rule->source)
->assertSee($rule->port);
}

View File

@ -20,6 +20,7 @@ public function test_see_logs()
]);
$this->get(route('servers.logs', $this->server))
->assertSuccessful()
->assertSeeText($log->type);
}
}

View File

@ -194,6 +194,7 @@ public function test_see_channels_list(): void
$channel = \App\Models\NotificationChannel::factory()->create();
$this->get(route('notification-channels'))
->assertSuccessful()
->assertSee($channel->provider);
}

View File

@ -16,6 +16,7 @@ public function test_profile_page_is_displayed(): void
$this
->get(route('profile'))
->assertSuccessful()
->assertSee('Profile Information')
->assertSee('Update Password')
->assertSee('Two Factor Authentication');

View File

@ -32,6 +32,7 @@ public function test_see_projects_list(): void
]);
$this->get(route('projects'))
->assertSuccessful()
->assertSee($project->name);
}

View File

@ -27,7 +27,7 @@ public function test_see_queues()
'site' => $this->site,
])
)
->assertOk()
->assertSuccessful()
->assertSee($queue->command);
}

View File

@ -27,6 +27,7 @@ public function test_see_server_keys()
]);
$this->get(route('servers.ssh-keys', $this->server))
->assertSuccessful()
->assertSeeText('My first key');
}

View File

@ -70,6 +70,7 @@ public function test_see_providers_list(): void
]);
$this->get(route('server-providers'))
->assertSuccessful()
->assertSee($provider->profile);
}

View File

@ -16,6 +16,8 @@ public function test_see_services_list(): void
$this->actingAs($this->user);
$this->get(route('servers.services', $this->server))
->assertSuccessful()
->assertSee('mysql')
->assertSee('nginx')
->assertSee('php')
->assertSee('supervisor')
@ -242,6 +244,7 @@ public static function data(): array
['redis'],
['ufw'],
['php'],
['mysql'],
];
}
}

View File

@ -57,7 +57,7 @@ public function test_see_sites_list(): void
$this->get(route('servers.sites', [
'server' => $this->server,
]))
->assertOk()
->assertSuccessful()
->assertSee($site->domain);
}
@ -178,7 +178,7 @@ public function test_see_logs(): void
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee('Logs');
}
}

View File

@ -29,6 +29,7 @@ public function test_get_public_keys_list(): void
]);
$this->get(route('ssh-keys'))
->assertSuccessful()
->assertSee($key->name);
}

View File

@ -25,7 +25,7 @@ public function test_see_ssls_list()
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee($ssl->type);
}
@ -37,7 +37,7 @@ public function test_see_ssls_list_with_no_ssls()
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSeeText(__("You don't have any SSL certificates yet!"));
}

View File

@ -41,6 +41,7 @@ public function test_see_providers_list(): void
]);
$this->get(route('storage-providers'))
->assertSuccessful()
->assertSee($provider->profile);
}