9eaa9322dc
3 read-only эндпоинта под группой [saas-admin,admin-db] (cross-tenant через pgsql_admin): L1 сводка (Финансы+Здоровье), L2 Финансы (KPI+внимание+топ), L2 Здоровье (6 подсистем+светофор). TDD, 83 admin-теста зелёные. baseline: +3 Pest getJson false-positive. Без маржи, без новых таблиц. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 lines
497 B
PHP
16 lines
497 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
it('GET /api/admin/dashboard/health returns 6 subsystems with light', function () {
|
|
$res = $this->getJson('/api/admin/dashboard/health');
|
|
|
|
$res->assertOk();
|
|
$res->assertJsonStructure([
|
|
'subsystems' => [['key', 'light', 'detail']],
|
|
'overall_light',
|
|
]);
|
|
$keys = collect($res->json('subsystems'))->pluck('key')->all();
|
|
expect($keys)->toContain('queues', 'scheduler', 'supplier_sync', 'csv_drift', 'webhooks', 'incidents');
|
|
});
|