feat(platform): customerize realtime map workspace

This commit is contained in:
lingniu
2026-07-05 01:16:45 +08:00
parent 83f033244c
commit 11710ec6fa
4 changed files with 362 additions and 6 deletions

View File

@@ -191,8 +191,9 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
expect(await screen.findByText((content) => content.includes('platform-20260704153357'))).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '顶部地图态势' }));
expect(window.location.hash).toBe('#/map');
expect(await screen.findByRole('heading', { name: '实时地图' })).toBeInTheDocument();
expect(screen.getByText('地图车辆队列')).toBeInTheDocument();
expect(await screen.findByRole('heading', { name: '车辆实时地图' })).toBeInTheDocument();
expect(screen.getByText('关注车辆')).toBeInTheDocument();
expect(screen.getByText('车辆列表')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '顶部实时监控' }));
expect(window.location.hash).toBe('#/realtime');
fireEvent.click(screen.getByRole('button', { name: '顶部轨迹回放' }));
@@ -8968,11 +8969,13 @@ test('shows realtime freshness status for recently updated and stale vehicles',
render(<App />);
expect(await screen.findByRole('heading', { name: '实时地图' })).toBeInTheDocument();
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('1 辆超过 5 分钟未更新。')).toBeInTheDocument();
expect(screen.getByText('关注车辆')).toBeInTheDocument();
expect(screen.getByText('选中车辆')).toBeInTheDocument();
expect(screen.getByText('车辆列表')).toBeInTheDocument();
expect(screen.getByText('1 辆更新超时')).toBeInTheDocument();
});
test('exports current realtime vehicles as CSV', async () => {