feat(platform): align realtime copy with vehicle monitoring

This commit is contained in:
lingniu
2026-07-06 04:44:31 +08:00
parent 77c5730e77
commit b9b5409acb
2 changed files with 18 additions and 18 deletions

View File

@@ -11218,9 +11218,9 @@ test('frames realtime page as one vehicle service with source evidence', async (
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.getByRole('button', { name: '实时运营建议 复盘选中车辆 轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '实时运营建议 导出当前实时清单 导出 CSV' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆监控建议 先处理异常车辆 关注异常' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆监控建议 复盘选中车辆 轨迹回放' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆监控建议 导出当前实时清单 导出 CSV' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '实时监控路径 只看在线 在线车辆' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '实时监控路径 地图态势 查看地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '实时监控路径 异常优先 关注车辆' })).toBeInTheDocument();
@@ -11241,7 +11241,7 @@ test('frames realtime page as one vehicle service with source evidence', async (
expect(screen.getByText('GB32960 在线')).toBeInTheDocument();
expect(screen.getByText('JT808 在线')).toBeInTheDocument();
expect(screen.getByText('YUTONG_MQTT 未接入')).toBeInTheDocument();
expect(screen.getByText('实时运营影响')).toBeInTheDocument();
expect(screen.getByText('车辆监控影响')).toBeInTheDocument();
expect(screen.getByRole('button', { name: /复制影响报告/ })).toBeInTheDocument();
expect(screen.getAllByText('需要处置').length).toBeGreaterThan(0);
expect(screen.getByText('车辆范围')).toBeInTheDocument();
@@ -11251,7 +11251,7 @@ test('frames realtime page as one vehicle service with source evidence', async (
expect(screen.getByText('地图能力')).toBeInTheDocument();
expect(screen.getByText('当前页 1 辆,在线 1 辆,定位有效 1 辆,降级 0 辆,超时 1 辆。')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /复制影响报告/ }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【实时运营影响】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆监控影响】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('影响等级:需要处置'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围:当前页 1 / 总计 1覆盖率 100%'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线状态1 在线 / 0 离线'));
@@ -11778,8 +11778,8 @@ test('copies realtime operations summary from realtime page', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时监控http://localhost:3000/#/realtime?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹回放http://localhost:3000/#/history?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('告警事件http://localhost:3000/#/alert-events?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
fireEvent.click(screen.getByRole('button', { name: '复制实时运营交接包' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【实时运营交接包】'));
fireEvent.click(screen.getByRole('button', { name: '复制车辆监控交付包' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆监控交付包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('页面车辆3 / 总计 3版本'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线2离线1定位有效2需要关注2超时'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆覆盖GB32960在线 1/1实时 1/1JT808在线 1/2实时 2/2YUTONG_MQTT在线 0/1实时 1/1'));