feat(platform): expose missing sources per vehicle
This commit is contained in:
@@ -445,6 +445,7 @@ test('filters vehicle list by missing source evidence', async () => {
|
||||
phone: '13307795425',
|
||||
oem: 'G7s',
|
||||
protocols: ['GB32960', 'JT808'],
|
||||
missingProtocols: ['YUTONG_MQTT'],
|
||||
sourceCount: 2,
|
||||
onlineSourceCount: 0,
|
||||
online: false,
|
||||
@@ -472,9 +473,13 @@ test('filters vehicle list by missing source evidence', async () => {
|
||||
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('缺失来源')).toBeInTheDocument();
|
||||
await waitFor(() => {
|
||||
expect(screen.getAllByText('缺失来源').length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
expect(screen.getAllByText('缺 YUTONG_MQTT').length).toBeGreaterThanOrEqual(1);
|
||||
fireEvent.click(screen.getByTestId('missing-protocol-filter'));
|
||||
fireEvent.click(await screen.findByText('缺 YUTONG_MQTT'));
|
||||
const mqttOptions = await screen.findAllByText('缺 YUTONG_MQTT');
|
||||
fireEvent.click(mqttOptions[mqttOptions.length - 1]);
|
||||
fireEvent.click(screen.getByRole('button', { name: '查询' }));
|
||||
|
||||
await waitFor(() => {
|
||||
|
||||
Reference in New Issue
Block a user