feat(platform): add alert notification handoff

This commit is contained in:
lingniu
2026-07-04 20:54:22 +08:00
parent bfb16c548e
commit df6404e789
2 changed files with 97 additions and 1 deletions

View File

@@ -3897,6 +3897,23 @@ test('copies priority queue notification digest on quality page', async () => {
expect(await screen.findByText('处置优先队列')).toBeInTheDocument();
expect(await screen.findByText('platform-20260704153951')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '复制通知交接包' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【告警通知交接包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('运行版本platform-20260704153951'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('当前筛选:全部告警'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('问题车辆2问题记录2'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('优先级P0 1 条 / P1 1 条'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('活跃规则2 类'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('主通知策略P0 实时中断 / 接入运维 + 业务责任人 / 站内告警 / 邮件 / 企业微信 / 30 分钟升级'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('统一验收:来源恢复并持续 10 分钟,车辆服务可查到实时与历史证据'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. [P0] 粤A汇总1 / VIN-DIGEST-001'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('实时http://localhost:3000/#/realtime?keyword=VIN-DIGEST-001&protocol=VEHICLE_SERVICE'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('RAWhttp://localhost:3000/#/history-query?keyword=VIN-DIGEST-001&protocol=VEHICLE_SERVICE&tab=raw&dateFrom=2026-07-03&dateTo=2026-07-04&includeFields=true'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('2. [P1] 粤A汇总2 / 13307795426'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('通知规则http://localhost:3000/#/notification-rules'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('运维质量http://localhost:3000/#/ops-quality'));
fireEvent.click(screen.getByRole('button', { name: '复制优先队列通知汇总' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【告警优先队列汇总】'));