Keep the result fixture compatible with strict TypeScript

This commit is contained in:
2026-11-17 23:15:57 +01:00
parent 62f13beef2
commit 01cd3ba4cb
+3 -2
View File
@@ -88,7 +88,8 @@ test('opens a single result automatically and shows each result at its own devic
if (id === operationId || id === multiOperationId) return r.fulfill({ json: {
operation_id: id, customer_name: 'Nord', title: script.name, approval_state: 'approved',
execution_state: id === operationId ? 'succeeded' : 'partially_succeeded',
targets: [linux, windows], jobs: id === operationId ? [jobs[0]] : jobs
targets: id === operationId ? [linux] : [linux, windows],
jobs: id === operationId ? jobs.slice(0, 1) : jobs
} });
}
const job = jobs.find(item => pathname === api + '/jobs/' + item.job_id);
@@ -109,7 +110,7 @@ test('opens a single result automatically and shows each result at its own devic
await expect(page.getByRole('heading', { name: 'Ergebnis für test-linux' })).toBeVisible();
await expect(page.getByLabel('stdout Textansicht')).toHaveText('Linux');
await expect(page.getByText('Exitcode 0', { exact: true })).toBeVisible();
expect([...resultReads]).toEqual([jobs[0].job_id]);
expect([...resultReads]).toEqual(jobs.slice(0, 1).map(job => job.job_id));
await page.setViewportSize({ width: 390, height: 844 });
resultReads.clear();