feat(platform): add trajectory impact board
This commit is contained in:
@@ -4918,6 +4918,20 @@ test('copies trajectory playback summary from history page', async () => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程复核:http://localhost:3000/#/mileage?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&dateFrom=2026-07-03&dateTo=2026-07-04'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务:http://localhost:3000/#/detail?keyword=VIN-HISTORY-SUMMARY&protocol=JT808'));
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制轨迹影响/ }));
|
||||
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹运营影响】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:VIN-HISTORY-SUMMARY'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('数据来源:JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('业务状态:需要复核'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹范围:位置 2 / 有效定位 2 / RAW 1 / 字段 2'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('定位覆盖率:100%'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('回放跨度:60 分钟,采样间隔:60 分钟/点'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常影响:断点 1 / 里程回退 0 / 超速 0'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('地图能力:高德 JS API 待配置'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史查询:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=location&dateFrom=2026-07-03&dateTo=2026-07-04'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('RAW证据:http://localhost:3000/#/history-query?keyword=VIN-HISTORY-SUMMARY&protocol=JT808&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true'));
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制轨迹复盘包/ }));
|
||||
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹复盘交接包】'));
|
||||
@@ -6045,6 +6059,12 @@ test('shows trajectory playback workspace from history locations', async () => {
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByRole('heading', { name: '轨迹回放' })).toBeInTheDocument();
|
||||
expect(screen.getByText('轨迹运营影响')).toBeInTheDocument();
|
||||
expect(screen.getByText('轨迹范围')).toBeInTheDocument();
|
||||
expect(screen.getByText('定位覆盖')).toBeInTheDocument();
|
||||
expect(screen.getByText('异常影响')).toBeInTheDocument();
|
||||
expect(screen.getByText('RAW证据')).toBeInTheDocument();
|
||||
expect(screen.getByText('地图能力')).toBeInTheDocument();
|
||||
expect(screen.getByText('轨迹回放作业台')).toBeInTheDocument();
|
||||
expect(screen.getByText('2 个有效轨迹点')).toBeInTheDocument();
|
||||
expect(screen.getByText('区间里程')).toBeInTheDocument();
|
||||
@@ -6094,7 +6114,7 @@ test('shows trajectory evidence quality on history playback workspace', async ()
|
||||
|
||||
expect(await screen.findByText('轨迹证据质量')).toBeInTheDocument();
|
||||
expect(screen.getByText('定位覆盖率')).toBeInTheDocument();
|
||||
expect(screen.getByText('100%')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('100%').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('回放跨度')).toBeInTheDocument();
|
||||
expect(screen.getByText('10 分钟')).toBeInTheDocument();
|
||||
expect(screen.getByText('采样间隔')).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user