feat(platform): refine vehicle operations language
This commit is contained in:
@@ -21,9 +21,9 @@ test('renders vehicle platform shell', () => {
|
||||
|
||||
render(<App />);
|
||||
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.getAllByText('告警通知').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('系统运维')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('运营驾驶舱').length).toBeGreaterThanOrEqual(1);
|
||||
@@ -197,11 +197,11 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
|
||||
expect(window.location.hash).toBe('#/realtime');
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部轨迹回放' }));
|
||||
expect(window.location.hash.startsWith('#/history')).toBe(true);
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部历史查询' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部数据导出' }));
|
||||
expect(window.location.hash.startsWith('#/history-query')).toBe(true);
|
||||
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('tab')).toBe('raw');
|
||||
expect(await screen.findByRole('heading', { name: '历史查询' })).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部统计查询' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '顶部里程统计' }));
|
||||
expect(window.location.hash.startsWith('#/mileage')).toBe(true);
|
||||
fireEvent.click(await screen.findByRole('button', { name: '顶部告警事件正常' }));
|
||||
expect(window.location.hash).toBe('#/alert-events');
|
||||
@@ -2340,7 +2340,7 @@ test('shows and clears current vehicle service filters', async () => {
|
||||
expect(await screen.findByText('当前车辆筛选')).toBeInTheDocument();
|
||||
expect(screen.getByText('关键词:粤A')).toBeInTheDocument();
|
||||
expect(screen.getByText('数据来源:JT808')).toBeInTheDocument();
|
||||
expect(screen.getByText('来源覆盖:多源')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆覆盖:多源')).toBeInTheDocument();
|
||||
expect(screen.getByText('缺失来源:YUTONG_MQTT')).toBeInTheDocument();
|
||||
expect(screen.getByText('服务状态:来源不完整')).toBeInTheDocument();
|
||||
expect(screen.getByText('在线:在线')).toBeInTheDocument();
|
||||
@@ -9160,13 +9160,13 @@ test('copies realtime operations summary from realtime page', async () => {
|
||||
expect(screen.getByText('实时作业入口')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '实时筛选 在线车辆 2' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '实时筛选 离线车辆 1' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '实时筛选 降级服务 2' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '实时筛选 需要关注 2' })).toBeInTheDocument();
|
||||
expect(screen.getByText('建议处置')).toBeInTheDocument();
|
||||
expect(screen.getByText('排查降级服务 2')).toBeInTheDocument();
|
||||
expect(screen.getByText('协议地图覆盖')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '筛选协议 GB32960' })).toHaveTextContent('GB32960');
|
||||
expect(screen.getByRole('button', { name: '筛选协议 JT808' })).toHaveTextContent('2 辆');
|
||||
expect(screen.getByRole('button', { name: '筛选协议 YUTONG_MQTT' })).toHaveTextContent('超时 1');
|
||||
expect(screen.getByText('查看需关注车辆 2')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆覆盖概览')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '筛选数据通道 GB32960' })).toHaveTextContent('GB32960');
|
||||
expect(screen.getByRole('button', { name: '筛选数据通道 JT808' })).toHaveTextContent('2 辆');
|
||||
expect(screen.getByRole('button', { name: '筛选数据通道 YUTONG_MQTT' })).toHaveTextContent('超时 1');
|
||||
expect(screen.getByText('实时覆盖判读')).toBeInTheDocument();
|
||||
expect(screen.getByText('在线率')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('66.7%').length).toBeGreaterThanOrEqual(3);
|
||||
@@ -9180,7 +9180,7 @@ test('copies realtime operations summary from realtime page', async () => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前筛选:数据来源:JT808;在线:在线'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆总数:3,当前页:3'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线车辆:2,定位有效:2'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('降级服务:2,来源类型:3'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('需要关注:2,数据通道:3'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('地图配置:已配置'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('重点车辆:'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('粤A摘要3 / YUTONG_MQTT / 车辆离线'));
|
||||
@@ -9197,18 +9197,18 @@ 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/1;JT808:在线 1/2,实时 2/2;YUTONG_MQTT:在线 0/1,实时 1/1'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('值班入口:http://localhost:3000/#/realtime?protocol=JT808&online=online'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线:2;离线:1;定位有效:2;需要关注:2;超时:'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆覆盖:GB32960:在线 1/1,实时 1/1;JT808:在线 1/2,实时 2/2;YUTONG_MQTT:在线 0/1,实时 1/1'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时入口:http://localhost:3000/#/realtime?protocol=JT808&online=online'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务:http://localhost:3000/#/detail?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程统计:http://localhost:3000/#/mileage?keyword=VIN-RT-SUMMARY-003&protocol=JT808'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史RAW:http://localhost:3000/api/history/raw-frames?protocol=JT808&vin=VIN-RT-SUMMARY-003&limit=20&includeFields=true'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '实时筛选 降级服务 2' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '实时筛选 需要关注 2' }));
|
||||
expect(window.location.hash).toBe('#/realtime?protocol=JT808&serviceStatus=degraded&online=online');
|
||||
fireEvent.click(screen.getByRole('button', { name: '筛选协议 GB32960' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '筛选数据通道 GB32960' }));
|
||||
expect(window.location.hash).toBe('#/realtime?protocol=GB32960&serviceStatus=degraded&online=online');
|
||||
});
|
||||
|
||||
@@ -9313,7 +9313,7 @@ test('shows production AMap integration status on realtime page', async () => {
|
||||
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('地图接入状态')).toBeInTheDocument();
|
||||
expect(await screen.findByText('地图能力状态')).toBeInTheDocument();
|
||||
expect(screen.getByText('Web JS Key')).toBeInTheDocument();
|
||||
expect(screen.getByText('服务端 API Key')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('已配置').length).toBeGreaterThan(0);
|
||||
@@ -9682,7 +9682,7 @@ test('surfaces multi-source realtime consistency issues with quality drilldown',
|
||||
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('多来源一致性检查')).toBeInTheDocument();
|
||||
expect(await screen.findByText('车辆数据一致性检查')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('粤A一致监控').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('一致性诊断:YUTONG_MQTT 离线,GB32960/JT808 仍可支撑车辆服务')).toBeInTheDocument();
|
||||
expect(screen.getByText('一致性:YUTONG_MQTT 离线')).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user