feat(platform): refine customer mileage evidence copy

This commit is contained in:
lingniu
2026-07-05 11:37:29 +08:00
parent 69496d6ca7
commit 2b423a3643
2 changed files with 40 additions and 40 deletions

View File

@@ -7682,7 +7682,7 @@ test('opens same-day raw frame evidence from mileage row', async () => {
render(<App />);
expect(await screen.findByText('VIN-MILEAGE-RAW')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '核对 RAW' }));
fireEvent.click(screen.getByRole('button', { name: '核对原始' }));
await waitFor(() => {
expect(window.location.hash.startsWith('#/history-query?')).toBe(true);
@@ -7774,7 +7774,7 @@ test('shows mileage anomaly action guidance', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常等级warning'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务http://localhost:3000/#/detail?keyword=VIN-MILEAGE-ANOMALY&protocol=GB32960'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹证据http://localhost:3000/#/history?keyword=VIN-MILEAGE-ANOMALY&protocol=GB32960&dateFrom=2026-07-03&dateTo=2026-07-04'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('RAW证据http://localhost:3000/#/history-query?keyword=VIN-MILEAGE-ANOMALY&protocol=GB32960&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('原始记录http://localhost:3000/#/history-query?keyword=VIN-MILEAGE-ANOMALY&protocol=GB32960&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统计查询http://localhost:3000/#/mileage?keyword=VIN-MILEAGE-ANOMALY&protocol=GB32960&dateFrom=2026-07-03&dateTo=2026-07-04'));
});
@@ -7851,7 +7851,7 @@ test('shows mileage statistics workspace with trend source and definition', asyn
expect(screen.getAllByText('当前筛选范围汇总总里程与明细合计一致,可作为统计证据。').length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('button', { name: '复制闭合摘要' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '闭合复核轨迹' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '闭合复核 RAW' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '闭合复核原始' })).toBeInTheDocument();
expect(screen.getByText('统计发布审计')).toBeInTheDocument();
expect(screen.getAllByText('复核后发布').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('区间闭合').length).toBeGreaterThanOrEqual(1);
@@ -8004,7 +8004,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByText('当前统计证据')).toBeInTheDocument();
expect(screen.getByText('3 车 / 2 来源 / 3 条明细')).toBeInTheDocument();
expect(screen.getByText('客户里程决策台')).toBeInTheDocument();
expect(screen.getByText('先判断能不能交付,再进入轨迹、RAW 和导出复核')).toBeInTheDocument();
expect(screen.getByText('先判断能不能交付,再进入轨迹、原始记录和导出复核')).toBeInTheDocument();
expect(screen.getAllByRole('button', { name: '复制决策说明' }).length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('button', { name: '客户里程决策 交付结论 复制决策' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户里程决策 区间闭合 统计摘要' })).toBeInTheDocument();
@@ -8012,7 +8012,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByRole('button', { name: '客户里程决策 异常复核 异常证据' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户里程决策 在线影响 在线态势' })).toBeInTheDocument();
expect(screen.getByText('客户里程复核交付包')).toBeInTheDocument();
expect(screen.getByText('面向客户交付里程时,先确认区间里程、闭合状态、异常记录和在线影响,再导出明细或进入轨迹与 RAW 证据复核。')).toBeInTheDocument();
expect(screen.getByText('面向客户交付里程时,先确认区间里程、闭合状态、异常记录和在线影响,再导出明细或进入轨迹与原始记录复核。')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '里程交付 区间里程 复制交付' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '里程交付 闭合校验 闭合摘要' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '里程交付 异常记录 异常证据' })).toBeInTheDocument();
@@ -8039,7 +8039,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByText('在线统计运营态势')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '复制在线态势' })).toBeInTheDocument();
expect(screen.getByText('离线车辆')).toBeInTheDocument();
expect(screen.getByText('协议覆盖')).toBeInTheDocument();
expect(screen.getAllByText('来源覆盖').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('当前页离线')).toBeInTheDocument();
expect(screen.getByText('最长离线')).toBeInTheDocument();
expect(screen.getByText('统计证据')).toBeInTheDocument();
@@ -8056,7 +8056,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('累计里程210 km'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线状态3 在线 / 1 离线 / 在线率 75%'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('发布判断:复核后发布'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('业务影响:当前统计范围需要先复核轨迹、RAW和离线车辆影响'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('业务影响:当前统计范围需要先复核轨迹、原始记录和离线车辆影响'));
fireEvent.click(screen.getAllByRole('button', { name: '复制决策说明' })[0]);
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户里程决策说明】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('决策结论:复核后交付'));
@@ -8071,7 +8071,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前页车辆2 / 当前筛选 2'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('最长离线粤A离线1 / 2 小时 / 2026-07-03 18:12:10'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. JT8082/3在线率 66.7%'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('2. 离线车辆优先打开车辆服务,核对实时、轨迹、RAW 和告警证据'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('2. 离线车辆优先打开车辆服务,核对实时、轨迹、原始记录和告警证据'));
fireEvent.click(screen.getByRole('button', { name: '里程交付 区间里程 复制交付' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户里程复核交付包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围VIN-STATS-SERVICE'));
@@ -8086,7 +8086,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆在线状态交接】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围VIN-STATS-SERVICE'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线概览3 在线 / 1 离线 / 在线率 75%'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('协议在线JT808 2/3GB32960 1/2'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('来源在线JT808 2/3GB32960 1/2'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. 粤A离线1 / VIN-STATS-SERVICE-OFFLINE / 广安车联'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('离线时长2 小时最后上报2026-07-03 18:12:10'));
});
@@ -8175,7 +8175,7 @@ test('copies mileage statistics summary for operations reporting', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('记录覆盖率50%'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('异常记录1'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('来源一致性:可做跨来源核对'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('发布风险:存在分页未全量、异常记录或闭合差值,需要先复核轨迹和 RAW 证据'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('发布风险:存在分页未全量、异常记录或闭合差值,需要先复核轨迹和原始记录'));
fireEvent.click(screen.getByRole('button', { name: '复制统计发布审计' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【统计发布审计】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('发布结论:复核后发布'));