feat(platform): surface archive gap actions
This commit is contained in:
@@ -101,7 +101,8 @@ test('dashboard renders vehicle service summary metrics', async () => {
|
||||
{ protocol: 'JT808', online: 157, total: 388 },
|
||||
{ protocol: 'YUTONG_MQTT', online: 0, total: 0 }
|
||||
],
|
||||
missingSources: [{ protocol: 'YUTONG_MQTT', count: 1033 }]
|
||||
missingSources: [{ protocol: 'YUTONG_MQTT', count: 1033 }],
|
||||
archiveMissingFields: [{ field: 'phone', title: '缺手机号', count: 353 }]
|
||||
},
|
||||
traceId: 'trace-test',
|
||||
timestamp: 1783094400000
|
||||
@@ -258,7 +259,8 @@ test('dashboard shows vehicle service action queue', async () => {
|
||||
archiveIncompleteVehicles: 366,
|
||||
serviceStatuses: [],
|
||||
protocols: [],
|
||||
missingSources: [{ protocol: 'YUTONG_MQTT', count: 983 }]
|
||||
missingSources: [{ protocol: 'YUTONG_MQTT', count: 983 }],
|
||||
archiveMissingFields: [{ field: 'phone', title: '缺手机号', count: 353 }]
|
||||
},
|
||||
traceId: 'trace-test',
|
||||
timestamp: 1783094400000
|
||||
@@ -281,11 +283,12 @@ test('dashboard shows vehicle service action queue', async () => {
|
||||
expect(screen.getByRole('button', { name: '确认平台转发 461' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '维护身份绑定 9' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '完善车辆档案 366' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '补齐缺手机号 353' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '补齐 YUTONG_MQTT 来源 983' })).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '完善车辆档案 366' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '补齐缺手机号 353' }));
|
||||
await waitFor(() => {
|
||||
expect(window.location.hash).toBe('#/vehicles?archiveStatus=incomplete');
|
||||
expect(window.location.hash).toBe('#/vehicles?archiveMissing=phone');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user