feat(platform): surface overview consistency

This commit is contained in:
lingniu
2026-07-04 04:06:54 +08:00
parent db70f58a7c
commit 7b801b6f71
9 changed files with 83 additions and 24 deletions

View File

@@ -379,6 +379,14 @@ test('shows resolved vehicle service status after topbar search', async () => {
detail: '后端统一车辆服务状态',
sourceCount: 2,
onlineSourceCount: 1
},
sourceConsistency: {
sourceCount: 2,
onlineSourceCount: 1,
locatedSourceCount: 2,
mileageDeltaKm: 0,
sourceTimeDeltaSeconds: 0,
scope: 'all_sources'
}
},
traceId: 'trace-test',
@@ -424,6 +432,7 @@ test('shows resolved vehicle service status after topbar search', async () => {
expect(await screen.findByText('当前车辆:后端判定部分离线')).toBeInTheDocument();
expect(screen.getByText('粤AG18312 / LB9A32A24R0LS1426')).toBeInTheDocument();
expect(screen.getByText('一致性1/2 来源')).toBeInTheDocument();
expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('/api/vehicle-service/overview?keyword=%E7%B2%A4AG18312'), undefined);
expect(fetchMock).not.toHaveBeenCalledWith(expect.stringContaining('/api/vehicles/resolve'), undefined);
});