feat(platform): add customer map decision panel

This commit is contained in:
lingniu
2026-07-05 03:35:58 +08:00
parent 5cb2509457
commit 8052bf4af4
3 changed files with 220 additions and 4 deletions

View File

@@ -9140,6 +9140,17 @@ 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.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.getByText('实时盯车')).toBeInTheDocument();
expect(screen.getByText('异常优先')).toBeInTheDocument();
expect(screen.getAllByText('轨迹复盘').length).toBeGreaterThanOrEqual(1);
@@ -9170,6 +9181,11 @@ test('shows realtime freshness status for recently updated and stale vehicles',
});
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线态势1 在线 / 1 离线'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务http://localhost:3000/#/detail?keyword=VIN-STALE-001&protocol=JT808'));
fireEvent.click(screen.getByRole('button', { name: /复制地图决策说明/ }));
await waitFor(() => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【地图客户决策说明】'));
});
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位判断2 辆有有效坐标 / 0 辆无坐标'));
});
test('exports current realtime vehicles as CSV', async () => {