feat(platform): expose source slots in vehicle service

This commit is contained in:
lingniu
2026-07-04 07:30:56 +08:00
parent 2cfb9e551f
commit c528376ef9
9 changed files with 67 additions and 3 deletions

View File

@@ -289,6 +289,12 @@ test('shows vehicle service result summary on vehicle list filters', async () =>
phone: '13307795425',
oem: 'G7s',
protocols: ['GB32960', 'JT808'],
missingProtocols: ['YUTONG_MQTT'],
sourceStatus: [
{ protocol: 'GB32960', online: true, lastSeen: '2026-07-03 20:12:10', hasRealtime: true, hasHistory: false, hasRaw: false, hasMileage: false },
{ protocol: 'JT808', online: false, lastSeen: '2026-07-03 20:10:00', hasRealtime: true, hasHistory: false, hasRaw: false, hasMileage: false },
{ protocol: 'YUTONG_MQTT', online: false, lastSeen: '', hasRealtime: false, hasHistory: false, hasRaw: false, hasMileage: false }
],
sourceCount: 2,
onlineSourceCount: 1,
online: true,
@@ -334,6 +340,9 @@ test('shows vehicle service result summary on vehicle list filters', async () =>
expect(screen.getByText('待绑定')).toBeInTheDocument();
expect(screen.getByText('VIN-MULTI-001')).toBeInTheDocument();
expect(screen.getAllByText('来源证据').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('GB32960 在线')).toBeInTheDocument();
expect(screen.getByText('JT808 离线')).toBeInTheDocument();
expect(screen.getByText('YUTONG_MQTT 未接入')).toBeInTheDocument();
expect(screen.getByText('1/2 来源在线')).toBeInTheDocument();
});