diff --git a/tests/browser/order-composer.spec.ts b/tests/browser/order-composer.spec.ts index 14e31d0..9892411 100644 --- a/tests/browser/order-composer.spec.ts +++ b/tests/browser/order-composer.spec.ts @@ -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();