feat(platform): include alert escalation in digest
This commit is contained in:
@@ -524,6 +524,30 @@ test('dashboard exposes vehicle command center map actions', async () => {
|
||||
})
|
||||
} as Response;
|
||||
}
|
||||
if (path.includes('/api/quality/notification-plan')) {
|
||||
return {
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
data: {
|
||||
summary: {
|
||||
issueVehicleCount: 2,
|
||||
issueRecordCount: 2,
|
||||
errorCount: 1,
|
||||
warningCount: 1,
|
||||
protocols: [{ name: 'VEHICLE_SERVICE', count: 1 }, { name: 'JT808', count: 1 }],
|
||||
issueTypes: [{ name: 'NO_SOURCE', count: 1 }, { name: 'VIN_MISSING', count: 1 }]
|
||||
},
|
||||
rules: [],
|
||||
policies: [{ name: 'P0 实时中断', target: '接入运维 + 业务责任人', channel: '站内告警 / 邮件 / 企业微信', condition: '无来源、VIN 缺失、存储不可写', escalationMinutes: 30, acceptanceCriteria: '来源恢复并持续 10 分钟,车辆服务可查到实时与历史证据' }],
|
||||
priorityIssues: [],
|
||||
activeRuleCount: 1,
|
||||
p0RuleCount: 1
|
||||
},
|
||||
traceId: 'trace-test',
|
||||
timestamp: 1783094400000
|
||||
})
|
||||
} as Response;
|
||||
}
|
||||
if (path.includes('/api/quality/issues')) {
|
||||
return {
|
||||
ok: true,
|
||||
@@ -3419,6 +3443,8 @@ test('copies priority queue notification digest on quality page', async () => {
|
||||
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【告警优先队列汇总】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('运行版本:platform-20260704153951'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('通知升级:P0 实时中断 / 30 分钟升级 / 接入运维 + 业务责任人'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('验收标准:来源恢复并持续 10 分钟,车辆服务可查到实时与历史证据'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('P0:1 条,P1:1 条'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. [P0] 粤A汇总1 / VIN-DIGEST-001'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('确认平台转发'));
|
||||
|
||||
Reference in New Issue
Block a user