feat(platform): refine realtime vehicle monitoring workflow

This commit is contained in:
lingniu
2026-07-05 12:37:26 +08:00
parent 0b7fc31d52
commit 9c6973b4ee
2 changed files with 23 additions and 20 deletions

View File

@@ -8992,7 +8992,7 @@ test('shows canonical service status in realtime vehicles', async () => {
render(<App />);
expect((await screen.findAllByText('VIN-RT-DEGRADED')).length).toBeGreaterThan(0);
expect(screen.getAllByText('来源不完整').length).toBeGreaterThan(0);
expect(screen.getAllByText('数据通道不完整').length).toBeGreaterThan(0);
});
test('frames realtime page as one vehicle service with source evidence', async () => {
@@ -9535,7 +9535,7 @@ test('copies realtime operations summary from realtime page', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时入口http://localhost:3000/#/realtime?protocol=JT808&online=online'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务http://localhost:3000/#/detail?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程统计http://localhost:3000/#/mileage?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('原始记录http://localhost:3000/api/history/raw-frames?protocol=JT808&vin=VIN-RT-SUMMARY-003&limit=20&includeFields=true'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史查询http://localhost:3000/api/history/raw-frames?protocol=JT808&vin=VIN-RT-SUMMARY-003&limit=20&includeFields=true'));
fireEvent.click(screen.getByRole('button', { name: '实时筛选 需要关注 2' }));
expect(window.location.hash).toBe('#/realtime?protocol=JT808&serviceStatus=degraded&online=online');
fireEvent.click(screen.getByRole('button', { name: '筛选数据通道 GB32960' }));
@@ -10323,7 +10323,7 @@ test('shows and clears current realtime service filters', async () => {
expect(screen.getByText('关键词粤ART002')).toBeInTheDocument();
expect(screen.getAllByText('数据通道JT808').length).toBeGreaterThan(0);
expect(screen.getByText('在线:在线')).toBeInTheDocument();
expect(screen.getByText('服务状态:来源不完整')).toBeInTheDocument();
expect(screen.getByText('服务状态:数据通道不完整')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '清空筛选' }));
await waitFor(() => {