feat(platform): add alert evidence package

This commit is contained in:
lingniu
2026-07-04 19:53:28 +08:00
parent 9e38112ece
commit b0451982a1
2 changed files with 45 additions and 0 deletions

View File

@@ -3837,6 +3837,20 @@ test('copies notification text from regular quality issue row', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('详情:位置字段缺失,影响轨迹回放'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹证据http://localhost:3000/#/history?keyword=VIN-ROW-NOTIFY&protocol=GB32960&dateFrom=2026-07-03&dateTo=2026-07-04'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务http://localhost:3000/#/detail?keyword=VIN-ROW-NOTIFY&protocol=GB32960'));
const evidenceButtons = screen.getAllByRole('button', { name: '复制证据包' });
expect(evidenceButtons.length).toBeGreaterThanOrEqual(2);
fireEvent.click(evidenceButtons[evidenceButtons.length - 1]);
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【告警证据包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('优先级P1'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('验收标准:缺失字段恢复解析,统计、定位或里程依赖的核心字段可查询'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时定位http://localhost:3000/#/realtime?keyword=VIN-ROW-NOTIFY&protocol=GB32960'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('轨迹回放http://localhost:3000/#/history?keyword=VIN-ROW-NOTIFY&protocol=GB32960&dateFrom=2026-07-03&dateTo=2026-07-04'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('RAW证据http://localhost:3000/#/history-query?keyword=VIN-ROW-NOTIFY&protocol=GB32960'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('includeFields=true'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程复核http://localhost:3000/#/mileage?keyword=VIN-ROW-NOTIFY&protocol=GB32960&dateFrom=2026-07-03&dateTo=2026-07-04'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆服务http://localhost:3000/#/detail?keyword=VIN-ROW-NOTIFY&protocol=GB32960'));
});
test('opens realtime map context from quality priority queue', async () => {