feat(platform): add customer mileage review console

This commit is contained in:
lingniu
2026-07-05 01:24:56 +08:00
parent 11710ec6fa
commit 72a4761bdb
3 changed files with 310 additions and 7 deletions

View File

@@ -7571,7 +7571,7 @@ test('shows mileage anomaly action guidance', async () => {
expect(await screen.findByText('VIN-MILEAGE-ANOMALY')).toBeInTheDocument();
expect(screen.getByText('核对里程来源')).toBeInTheDocument();
expect(screen.getByText('日里程异常,优先核对当天首末总里程、来源断链和补传数据。')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '复制证据' }));
fireEvent.click(screen.getAllByRole('button', { name: '复制证据' })[0]);
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【里程异常证据包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆粤A异常1 / VIN-MILEAGE-ANOMALY'));
@@ -7642,7 +7642,7 @@ test('shows mileage statistics workspace with trend source and definition', asyn
render(<App />);
expect(await screen.findByText('区间趋势')).toBeInTheDocument();
expect(screen.getByText('来源贡献')).toBeInTheDocument();
expect(screen.getAllByText('来源贡献').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('2026-07-01').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('2026-07-02').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('JT808').length).toBeGreaterThanOrEqual(1);
@@ -7668,7 +7668,7 @@ test('shows mileage statistics workspace with trend source and definition', asyn
expect(screen.getAllByText('异常记录').length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText('1').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('最大单日')).toBeInTheDocument();
expect(screen.getByText('60 km')).toBeInTheDocument();
expect(screen.getAllByText('60 km').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('统计可信度')).toBeInTheDocument();
expect(screen.getByText('异常率')).toBeInTheDocument();
expect(screen.getByText('25%')).toBeInTheDocument();
@@ -7678,7 +7678,7 @@ test('shows mileage statistics workspace with trend source and definition', asyn
expect(screen.getAllByText('100%').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('闭合校验')).toBeInTheDocument();
expect(screen.getAllByText('0 km').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('统计口径')).toBeInTheDocument();
expect(screen.getAllByText('统计口径').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText((content) => content.includes('区间总值应等于各日里程之和'))).toBeInTheDocument();
});
@@ -7820,7 +7820,7 @@ test('shows vehicle-first statistics domains for one vehicle service', async ()
expect(screen.getByText('当前页离线')).toBeInTheDocument();
expect(screen.getByText('最长离线')).toBeInTheDocument();
expect(screen.getByText('统计证据')).toBeInTheDocument();
expect(await screen.findByText('75%')).toBeInTheDocument();
expect((await screen.findAllByText('75%')).length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText((content) => content.includes('离线 1 车')).length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText((content) => content.includes('Redis 在线 92 key')).length).toBeGreaterThanOrEqual(1);
expect(screen.getAllByText((content) => content.includes('由车辆服务覆盖汇总、实时来源状态和 Redis 在线 key 计算')).length).toBeGreaterThanOrEqual(1);