feat(platform): add customer trajectory decision panel

This commit is contained in:
lingniu
2026-07-05 03:49:18 +08:00
parent 4445328581
commit 06d80f8147
3 changed files with 278 additions and 1 deletions

View File

@@ -5389,6 +5389,19 @@ test('copies trajectory playback summary from history page', async () => {
render(<App />);
expect((await screen.findAllByText('VIN-HISTORY-SUMMARY')).length).toBeGreaterThan(0);
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.getByRole('button', { name: '客户轨迹决策 证据交付 RAW证据' })).toBeInTheDocument();
fireEvent.click(screen.getAllByRole('button', { name: /复制决策说明/ })[0]);
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户轨迹决策说明】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('决策结论:可复盘,需附异常说明'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('客户复盘路径:'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('4. 最后回到证据:异常点必须打开 RAW、字段明细和里程统计复核。'));
fireEvent.click(screen.getByRole('button', { name: /复制轨迹摘要/ }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【轨迹回放摘要】'));
@@ -6411,6 +6424,9 @@ test('shows parsed field history as a flattened evidence table', async () => {
render(<App />);
expect(await screen.findByRole('heading', { name: '数据导出' })).toBeInTheDocument();
expect(screen.getByText('客户轨迹决策台')).toBeInTheDocument();
expect(screen.getAllByRole('button', { name: /复制决策说明/ }).length).toBeGreaterThanOrEqual(1);
expect(screen.getByRole('button', { name: '客户轨迹决策 证据交付 RAW证据' })).toBeInTheDocument();
expect(screen.getByText('客户数据交付包')).toBeInTheDocument();
expect(screen.getByText('面向客户交付时先确认车辆、时间、交付物和质量提示再导出位置、RAW 或字段明细,避免把内部排查过程直接暴露给客户。')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户数据交付 原始证据 导出RAW' })).toBeInTheDocument();