feat(platform): add customer data delivery checklist

This commit is contained in:
lingniu
2026-07-05 03:03:08 +08:00
parent 0df1d61eb1
commit f4891525a6
3 changed files with 154 additions and 0 deletions

View File

@@ -6309,6 +6309,11 @@ test('shows and clears current history filters while keeping vehicle scope', asy
test('shows parsed field history as a flattened evidence table', async () => {
window.history.replaceState(null, '', '/#/history-query?keyword=VIN-FIELDS-001&protocol=GB32960&tab=fields&fields=gb32960.vehicle.speed_kmh');
const writeText = vi.fn(() => Promise.resolve());
Object.defineProperty(navigator, 'clipboard', {
configurable: true,
value: { writeText }
});
const fetchMock = vi.spyOn(globalThis, 'fetch').mockImplementation(async (input, init) => {
const path = String(input);
if (path.includes('/api/ops/health')) {
@@ -6377,6 +6382,17 @@ test('shows parsed field history as a flattened evidence table', async () => {
expect(screen.getByRole('button', { name: '客户数据交付 原始证据 导出RAW' })).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.getByRole('button', { name: '客户交付清单 轨迹回放 查看轨迹' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户交付清单 里程复核 里程复核' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户交付清单 RAW证据 导出RAW' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户交付清单 字段明细 字段明细' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户交付清单 质量提示 复制清单' })).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /复制交付清单/ }));
await waitFor(() => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('交付物:位置历史 / 轨迹回放 / 里程复核 / RAW证据 / 字段明细 / 质量提示'));
});
expect(await screen.findByRole('tab', { name: '字段明细' })).toHaveAttribute('aria-selected', 'true');
expect(fetchMock).toHaveBeenCalledWith('/api/history/raw-frames/query', expect.objectContaining({
method: 'POST',