test(alerts): satisfy incident fixture types

The integrated retry test used incomplete structural casts that the full frontend type-check rejected. Mark the intentional hook subset adaptation explicitly and provide every required incident identity field without changing runtime behavior.\n\nChange-source: pulse-maintainer

Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-09-08 05:11:21 +01:00
parent 70dc88448d
commit 8b1e901f83
@@ -36,7 +36,7 @@ describe('AlertResourceIncidentsPanel', () => {
render(() => {
state = useAlertResourceIncidentsState();
return surface === 'inline' ? (
<AlertResourceIncidentsPanel state={state as AlertHistoryState} />
<AlertResourceIncidentsPanel state={state as unknown as AlertHistoryState} />
) : (
<MobileAlertHistoryInvestigationDialog
investigation={{
@@ -46,7 +46,7 @@ describe('AlertResourceIncidentsPanel', () => {
typeof MobileAlertHistoryInvestigationDialog
>[0]['investigation']['alert'],
}}
state={state as AlertHistoryState}
state={state as unknown as AlertHistoryState}
onClose={() => state.setResourceIncidentPanel(null)}
/>
);
@@ -69,14 +69,17 @@ describe('AlertResourceIncidentsPanel', () => {
resolve([
{
id: 'retained',
alertIdentifier: 'resource-1::connectivity',
alertType: 'connectivity',
level: 'critical',
resourceId: 'resource-1',
resourceName: 'Resource',
status: 'resolved',
acknowledged: false,
events: [],
openedAt: '2026-09-08T00:00:00Z',
message: 'Retained connection incident',
} as Incident,
},
]);
await waitFor(() => expect(screen.getByText('Retained connection incident')).toBeVisible());
expect(read).toHaveBeenLastCalledWith('resource-1', 10);