feat(platform): return service status in vehicle overview
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user