feat(platform): add alert closure timeline

This commit is contained in:
lingniu
2026-07-05 21:29:38 +08:00
parent 059e4586a7
commit b892ffce81
3 changed files with 195 additions and 1 deletions

View File

@@ -3923,6 +3923,13 @@ test('shows alert rule and notification policy workspace on quality page', async
expect(screen.getAllByText('立即处置').length).toBeGreaterThan(0);
expect(screen.getByText('待通知车辆')).toBeInTheDocument();
expect(screen.getAllByText('证据闭环').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('客户告警闭环时间线')).toBeInTheDocument();
expect(screen.getByText('从告警触发、车辆影响、责任通知、证据复核到恢复验收,形成客户可追踪的闭环。')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户告警闭环时间线 1 告警触发 5 条事件 查看事件' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户告警闭环时间线 2 影响车辆 3 辆车 影响摘要' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户告警闭环时间线 3 责任通知 接入运维 + 业务责任人 通知策略' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户告警闭环时间线 4 证据复核 实时/轨迹/里程 证据交接' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户告警闭环时间线 5 恢复验收 有标准 复制回执' })).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '复制告警决策' }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户告警决策说明】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('决策结论:立即处置'));
@@ -3951,7 +3958,7 @@ test('shows alert rule and notification policy workspace on quality page', async
expect(screen.getByRole('button', { name: '分派团队 平台接入' })).toHaveTextContent('2 条');
expect(screen.getByRole('button', { name: '分派团队 车辆档案' })).toHaveTextContent('主问题VIN 缺失');
expect(screen.getByRole('button', { name: '分派团队 基础设施' })).toHaveTextContent('SLA15 分钟恢复');
expect(screen.getByText('通知策略')).toBeInTheDocument();
expect(screen.getAllByText('通知策略').length).toBeGreaterThan(0);
expect(screen.getAllByText('P0 实时中断').length).toBeGreaterThan(0);
expect(screen.getAllByText('接入运维 + 业务责任人').length).toBeGreaterThan(0);
expect(screen.getByText('站内告警 / 邮件 / 企业微信')).toBeInTheDocument();