Handle Dokploy project composes in widget
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-29 10:45:21 +01:00
parent 78af7838bf
commit dba0cd5882
3 changed files with 136 additions and 2 deletions

View File

@@ -40,6 +40,13 @@ class DokployPlatformHealthWidgetTest extends TestCase
'branch' => 'main',
],
],
'compose' => [
[
'composeId' => 'cmp_1',
'name' => 'Main Compose',
'composeStatus' => 'done',
],
],
'redis' => [
[
'redisId' => 'redis_1',
@@ -63,12 +70,37 @@ class DokployPlatformHealthWidgetTest extends TestCase
],
]);
$fakeClient->shouldReceive('composeStatus')
->with('cmp_1')
->andReturn([
'compose' => [
'name' => 'Main Compose',
'composeStatus' => 'done',
'updatedAt' => now()->toIso8601String(),
],
'services' => [
[
'serviceName' => 'web',
'status' => 'running',
],
],
]);
$fakeClient->shouldReceive('composeDeployments')
->with('cmp_1', 1)
->andReturn([
[
'createdAt' => now()->toIso8601String(),
],
]);
$this->app->instance(DokployClient::class, $fakeClient);
Livewire::test(DokployPlatformHealth::class)
->assertStatus(200)
->assertSee('Core')
->assertSee('API')
->assertSee('Main Compose')
->assertSee('Redis');
}