feat(platform): add customer history export wizard
This commit is contained in:
@@ -8221,6 +8221,13 @@ test('shows parsed field history as a flattened evidence table', async () => {
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument();
|
||||
expect(screen.getAllByText('客户导出向导').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('按客户交付顺序完成:先锁定车辆和时间窗,再选择轨迹、明细、字段或统计证据,最后复核质量并复制交付包。')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '客户导出向导 1 锁定范围 VIN-FIELDS-001 / GB32960' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '客户导出向导 2 选择证据 字段证据' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '客户导出向导 3 质量复核 可交付' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '客户导出向导 4 导出交付 复制交付包' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: /复制导出向导包/ })).toBeInTheDocument();
|
||||
expect(screen.getByText('客户数据交付封面')).toBeInTheDocument();
|
||||
expect(screen.getByText('先给客户一个可读封面:交付结论、车辆范围、时间窗、交付物、质量提示和下一步动作。')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '客户数据交付封面 交付结论 可交付 复制封面' })).toBeInTheDocument();
|
||||
@@ -8364,6 +8371,15 @@ test('shows parsed field history as a flattened evidence table', async () => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付物:轨迹报告 / 位置历史 CSV / 明细证据 CSV / 字段裁剪 CSV / 统计查询链接 / 质量提示'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前证据:位置 0 条 / 有效坐标 0 点 / 明细 1 帧 / 字段 2 个'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('建议动作:优先导出字段证据,并补查轨迹位置。'));
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制导出向导包/ }));
|
||||
await waitFor(() => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户导出向导包】'));
|
||||
});
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('步骤1 锁定范围:VIN-FIELDS-001 / GB32960 / 2026-07-03 至 2026-07-04'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('步骤2 选择证据:字段证据'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('步骤3 质量复核:可交付'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('步骤4 导出交付:复制交付包'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('字段裁剪:http://localhost:3000/#/history-query?keyword=VIN-FIELDS-001&protocol=GB32960&tab=fields&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true&fields=gb32960.vehicle.speed_kmh'));
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制交付清单/ }));
|
||||
await waitFor(() => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付物:轨迹报告 / 位置历史 / 统计查询 / 明细证据 / 字段裁剪 / 质量提示'));
|
||||
|
||||
Reference in New Issue
Block a user