feat(platform): add map monitoring task strip

This commit is contained in:
lingniu
2026-07-05 02:14:00 +08:00
parent 13ef1779ac
commit 5d9576c5c7
3 changed files with 143 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
fireEvent.click(screen.getByRole('button', { name: '顶部地图态势' }));
expect(window.location.hash).toBe('#/map');
expect(await screen.findByRole('heading', { name: '车辆实时地图' })).toBeInTheDocument();
expect(screen.getByText('关注车辆')).toBeInTheDocument();
expect(screen.getAllByText('关注车辆').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('车辆列表')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '顶部实时监控' }));
expect(window.location.hash).toBe('#/realtime');
@@ -9016,7 +9016,15 @@ test('shows realtime freshness status for recently updated and stale vehicles',
expect(await screen.findByRole('heading', { name: '车辆实时地图' })).toBeInTheDocument();
expect(screen.getAllByText('数据新鲜').length).toBeGreaterThan(0);
expect(screen.getAllByText('更新超时').length).toBeGreaterThan(0);
expect(screen.getByText('关注车辆')).toBeInTheDocument();
expect(screen.getByText('实时盯车')).toBeInTheDocument();
expect(screen.getByText('异常优先')).toBeInTheDocument();
expect(screen.getByText('轨迹复盘')).toBeInTheDocument();
expect(screen.getByText('数据交付')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '地图监控任务 实时盯车 只看在线' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '地图监控任务 异常优先 关注车辆' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '地图监控任务 轨迹复盘 轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '地图监控任务 数据交付 导出当前页' })).toBeInTheDocument();
expect(screen.getAllByText('关注车辆').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('选中车辆')).toBeInTheDocument();
expect(screen.getByText('车辆列表')).toBeInTheDocument();
expect(screen.getByText('1 辆更新超时')).toBeInTheDocument();