diff --git a/e2e/specs/clinical-forms.spec.ts b/e2e/specs/clinical-forms.spec.ts index e0f35fff22..daa8d1c658 100644 --- a/e2e/specs/clinical-forms.spec.ts +++ b/e2e/specs/clinical-forms.spec.ts @@ -193,9 +193,9 @@ test('Form state is retained when minimizing a form in the workspace', async ({ }); await test.step('And I fill in values for the `White Blood Cells (WBC)`, `Platelets`, and `Neutrophils` questions', async () => { - await page.getByLabel(/white blood cells/i).fill('5000'); - await page.getByLabel(/platelets/i).fill('180000'); - await page.getByLabel(/neutrophils/i).fill('35'); + await page.getByRole('spinbutton', { name: /red blood cells/i }).fill('5000'); + await page.getByRole('spinbutton', { name: /platelets/i }).fill('180000'); + await page.getByRole('spinbutton', { name: /neutrophils/i }).fill('35'); }); await test.step('Then I minimize the form in the workspace', async () => { @@ -207,10 +207,8 @@ test('Form state is retained when minimizing a form in the workspace', async ({ }); await test.step('Then I should see the entered data retained in the form', async () => { - await expect(page.getByLabel(/white blood cells/i, { exact: true })).toHaveValue('5000'); - + await expect(page.getByLabel(/red blood cells/i, { exact: true })).toHaveValue('5000'); await expect(page.getByLabel(/platelets/i, { exact: true })).toHaveValue('180000'); - await expect(page.getByLabel(/neutrophils/i, { exact: true })).toHaveValue('35'); });