feat(platform): summarize missing vehicle sources

This commit is contained in:
lingniu
2026-07-04 06:13:38 +08:00
parent 1c210897bb
commit 8cd90f629b
7 changed files with 53 additions and 7 deletions

View File

@@ -427,7 +427,8 @@ test('filters vehicle list by missing source evidence', async () => {
singleSourceVehicles: 0,
multiSourceVehicles: 1,
noDataVehicles: 0,
unboundVehicles: 0
unboundVehicles: 0,
missingSources: [{ protocol: 'YUTONG_MQTT', count: 1 }]
},
traceId: 'trace-test',
timestamp: 1783094400000
@@ -477,6 +478,8 @@ test('filters vehicle list by missing source evidence', async () => {
expect(screen.getAllByText('缺失来源').length).toBeGreaterThanOrEqual(2);
});
expect(screen.getAllByText('缺 YUTONG_MQTT').length).toBeGreaterThanOrEqual(1);
fireEvent.click(screen.getByRole('button', { name: '缺 YUTONG_MQTT 1' }));
expect(window.location.hash).toBe('#/vehicles?missingProtocol=YUTONG_MQTT');
fireEvent.click(screen.getByRole('button', { name: '缺 YUTONG_MQTT' }));
expect(window.location.hash).toBe('#/vehicles?missingProtocol=YUTONG_MQTT');
await waitFor(() => {