feat(platform): add mileage delivery package

This commit is contained in:
lingniu
2026-07-05 02:51:52 +08:00
parent 07663026e4
commit 1640edf8cf
3 changed files with 247 additions and 1 deletions

View File

@@ -7883,6 +7883,12 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByText('三类数据源最终汇总为一个车辆服务统计视图')).toBeInTheDocument();
expect(screen.getByText('当前统计证据')).toBeInTheDocument();
expect(screen.getByText('3 车 / 2 来源 / 3 条明细')).toBeInTheDocument();
expect(screen.getByText('客户里程复核交付包')).toBeInTheDocument();
expect(screen.getByText('面向客户交付里程时,先确认区间里程、闭合状态、异常记录和在线影响,再导出明细或进入轨迹与 RAW 证据复核。')).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.getByText('统计影响范围')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '复制影响范围' })).toBeInTheDocument();
expect(screen.getByText('影响待复核')).toBeInTheDocument();
@@ -7892,7 +7898,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getAllByText('发布判断').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('区间复核')).toBeInTheDocument();
expect(screen.getByText('异常处理')).toBeInTheDocument();
expect(screen.getByText('数据交付')).toBeInTheDocument();
expect(screen.getAllByText('数据交付').length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('button', { name: '里程服务任务 发布判断 BI口径' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '里程服务任务 区间复核 轨迹证据' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '里程服务任务 异常处理 复制证据' })).toBeInTheDocument();
@@ -7933,6 +7939,12 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
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 和告警证据'));
fireEvent.click(screen.getByRole('button', { name: '里程交付 区间里程 复制交付' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户里程复核交付包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆范围VIN-STATS-SERVICE'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('累计里程210 km'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('发布判断:复核后发布'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统计口径:日里程按首末总里程差值计算,区间总值应等于每日里程之和'));
expect(await screen.findByText('在线状态明细')).toBeInTheDocument();
expect(await screen.findByText('VIN-STATS-SERVICE-OFFLINE')).toBeInTheDocument();
expect(screen.getByText('粤A离线1')).toBeInTheDocument();