feat(platform): expose missing sources per vehicle

This commit is contained in:
lingniu
2026-07-04 05:42:39 +08:00
parent bc6715b35b
commit 5e7c4b56ef
8 changed files with 44 additions and 2 deletions

View File

@@ -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(() => {