feat(platform): add vehicle service runbook
This commit is contained in:
@@ -10116,11 +10116,18 @@ test('shows unified service overview on vehicle detail', async () => {
|
||||
|
||||
expect(await screen.findByText('车辆服务概览')).toBeInTheDocument();
|
||||
expect(screen.getByText('单车服务作业台')).toBeInTheDocument();
|
||||
expect(screen.getByText('单车服务闭环Runbook')).toBeInTheDocument();
|
||||
expect(screen.getByText('实时定位')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('轨迹回放').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('RAW 证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('RAW 证据').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('告警处置')).toBeInTheDocument();
|
||||
expect(screen.getByText('里程复核')).toBeInTheDocument();
|
||||
expect(screen.getByText('确认实时状态')).toBeInTheDocument();
|
||||
expect(screen.getByText('回放轨迹断点')).toBeInTheDocument();
|
||||
expect(screen.getByText('核对 RAW 字段')).toBeInTheDocument();
|
||||
expect(screen.getByText('处理告警闭环')).toBeInTheDocument();
|
||||
expect(screen.getByText('复核统计口径')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆在线状态、最新时间、有效坐标均可解释。')).toBeInTheDocument();
|
||||
expect(screen.getByText('2026-07-03 20:12:10')).toBeInTheDocument();
|
||||
expect(screen.getByText('12 条历史')).toBeInTheDocument();
|
||||
expect(screen.getByText('34 帧')).toBeInTheDocument();
|
||||
@@ -10658,6 +10665,23 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(operationsCopied).toContain('轨迹回放:http://localhost:3000/#/history?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
expect(operationsCopied).toContain('RAW证据:http://localhost:3000/#/history-query?keyword=VIN-SUMMARY-001&protocol=JT808&tab=raw&includeFields=true');
|
||||
expect(operationsCopied).toContain('里程统计:http://localhost:3000/#/mileage?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制Runbook' }));
|
||||
await waitFor(() => {
|
||||
expect(writeText.mock.calls.some((call) => String(call[0]).includes('【单车服务闭环Runbook】'))).toBe(true);
|
||||
});
|
||||
const runbookCopied = String(writeText.mock.lastCall?.[0] ?? '');
|
||||
expect(runbookCopied).toContain('【单车服务闭环Runbook】');
|
||||
expect(runbookCopied).toContain('车辆:粤A诊断1 / VIN-SUMMARY-001');
|
||||
expect(runbookCopied).toContain('当前范围:单一来源:JT808');
|
||||
expect(runbookCopied).toContain('1. 确认实时状态');
|
||||
expect(runbookCopied).toContain('2. 回放轨迹断点');
|
||||
expect(runbookCopied).toContain('3. 核对 RAW 字段');
|
||||
expect(runbookCopied).toContain('4. 处理告警闭环');
|
||||
expect(runbookCopied).toContain('5. 复核统计口径');
|
||||
expect(runbookCopied).toContain('验收:车辆在线状态、最新时间、有效坐标均可解释。');
|
||||
expect(runbookCopied).toContain('告警事件:http://localhost:3000/#/alert-events?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
expect(runbookCopied).toContain('统计查询:http://localhost:3000/#/mileage?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
});
|
||||
|
||||
test('exports vehicle detail service dossier as csv', async () => {
|
||||
@@ -11661,5 +11685,5 @@ test('shows canonical vehicle archive on detail', async () => {
|
||||
expect(screen.getByText('缺手机号')).toBeInTheDocument();
|
||||
expect(screen.getByText('缺OEM')).toBeInTheDocument();
|
||||
expect(screen.getByText('归并来源数')).toBeInTheDocument();
|
||||
expect(screen.getByText('3')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('3').length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user