feat(platform): surface incomplete vehicle archives
This commit is contained in:
@@ -92,6 +92,7 @@ test('dashboard renders vehicle service summary metrics', async () => {
|
||||
multiSourceVehicles: 181,
|
||||
noDataVehicles: 461,
|
||||
identityRequiredVehicles: 9,
|
||||
archiveIncompleteVehicles: 366,
|
||||
serviceStatuses: [
|
||||
{ status: 'healthy', title: '服务正常', count: 161 },
|
||||
{ status: 'degraded', title: '来源不完整', count: 41 }
|
||||
@@ -128,6 +129,8 @@ test('dashboard renders vehicle service summary metrics', async () => {
|
||||
expect(screen.getByText('暂无来源车辆')).toBeInTheDocument();
|
||||
expect(screen.getByText('461')).toBeInTheDocument();
|
||||
expect(screen.getByText('身份未绑定')).toBeInTheDocument();
|
||||
expect(screen.getByText('档案不完整')).toBeInTheDocument();
|
||||
expect(screen.getByText('366')).toBeInTheDocument();
|
||||
expect(screen.getByText('来源证据在线分布')).toBeInTheDocument();
|
||||
expect(screen.getByText('YUTONG_MQTT')).toBeInTheDocument();
|
||||
expect(screen.getByText('0%')).toBeInTheDocument();
|
||||
@@ -252,6 +255,7 @@ test('dashboard shows vehicle service action queue', async () => {
|
||||
multiSourceVehicles: 181,
|
||||
noDataVehicles: 461,
|
||||
identityRequiredVehicles: 9,
|
||||
archiveIncompleteVehicles: 366,
|
||||
serviceStatuses: [],
|
||||
protocols: [],
|
||||
missingSources: [{ protocol: 'YUTONG_MQTT', count: 983 }]
|
||||
@@ -276,11 +280,12 @@ test('dashboard shows vehicle service action queue', async () => {
|
||||
expect(await screen.findByText('车辆服务处置队列')).toBeInTheDocument();
|
||||
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: '补齐 YUTONG_MQTT 来源 983' })).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '确认平台转发 461' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '完善车辆档案 366' }));
|
||||
await waitFor(() => {
|
||||
expect(window.location.hash).toBe('#/vehicles?serviceStatus=no_data');
|
||||
expect(window.location.hash).toBe('#/vehicles?archiveStatus=incomplete');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user