feat(platform): return service status in vehicle overview

This commit is contained in:
lingniu
2026-07-04 03:00:50 +08:00
parent 8dfbdc83e5
commit 1a86e5d38c
7 changed files with 65 additions and 19 deletions

View File

@@ -83,7 +83,15 @@ test('vehicleServiceOverview sends keyword to the lightweight overview endpoint'
historyCount: 0,
rawCount: 0,
mileageCount: 0,
qualityIssueCount: 0
qualityIssueCount: 0,
serviceStatus: {
status: 'degraded',
severity: 'warning',
title: '部分来源离线',
detail: '1/2 个来源在线',
sourceCount: 2,
onlineSourceCount: 1
}
},
traceId: 'trace-test',
timestamp: 1783094400000
@@ -94,6 +102,7 @@ test('vehicleServiceOverview sends keyword to the lightweight overview endpoint'
expect(fetchMock).toHaveBeenCalledWith('/api/vehicle-service/overview?keyword=%E7%B2%A4AG18312', undefined);
expect(result.coverageStatus).toBe('partial');
expect(result.serviceStatus?.status).toBe('degraded');
});
test('api errors include backend message, detail, and trace id', async () => {