feat(platform): refine realtime evidence wording

This commit is contained in:
lingniu
2026-07-05 04:13:44 +08:00
parent 6f3907c002
commit 1fd4bdb1a2
2 changed files with 20 additions and 20 deletions

View File

@@ -9447,9 +9447,9 @@ test('copies realtime operations summary from realtime page', async () => {
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.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);
@@ -9460,17 +9460,17 @@ test('copies realtime operations summary from realtime page', async () => {
fireEvent.click(screen.getByRole('button', { name: '复制实时摘要' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【实时监控摘要】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前筛选:数据通道JT808在线在线'));
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 / 车辆离线'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时页面http://localhost:3000/#/realtime?protocol=JT808&online=online'));
fireEvent.click(screen.getByRole('button', { name: '复制实时异常处置清单' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【实时异常处置清单】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前筛选:数据通道JT808在线在线'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前筛选:证据来源JT808在线在线'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常车辆3 / 当前页 3 / 总计 3'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('粤A摘要3 / VIN-RT-SUMMARY-003 / JT808'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('状态:车辆离线;在线:离线;问题:'));
@@ -9491,7 +9491,7 @@ test('copies realtime operations summary from realtime page', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('原始记录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' }));
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');
});
@@ -10274,7 +10274,7 @@ test('shows and clears current realtime service filters', async () => {
expect(await screen.findByText('当前实时筛选')).toBeInTheDocument();
expect(screen.getByText('关键词粤ART002')).toBeInTheDocument();
expect(screen.getByText('数据通道JT808')).toBeInTheDocument();
expect(screen.getByText('证据来源JT808')).toBeInTheDocument();
expect(screen.getByText('在线:在线')).toBeInTheDocument();
expect(screen.getByText('服务状态:来源不完整')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '清空筛选' }));
@@ -10313,7 +10313,7 @@ test('updates realtime hash when source filters are submitted', async () => {
await screen.findByRole('heading', { name: '实时监控' });
fireEvent.change(screen.getByPlaceholderText('VIN / 车牌 / 手机号 / OEM'), { target: { value: '粤ART002' } });
fireEvent.click(screen.getByText('全部数据通道'));
fireEvent.click(screen.getByText('全部证据来源'));
fireEvent.click(await screen.findByText('JT808'));
fireEvent.click(screen.getByRole('button', { name: '查询' }));