diff --git a/e2e/work-orders/inline-technician.spec.ts b/e2e/work-orders/inline-technician.spec.ts index f61412e0..f24acbd6 100644 --- a/e2e/work-orders/inline-technician.spec.ts +++ b/e2e/work-orders/inline-technician.spec.ts @@ -290,11 +290,8 @@ test.describe("Inline technician registration", () => { const row = page.locator("#wo-row-1"); await row.getByRole("button", { name: /Adam Whyte/ }).click(); const dialog = page.getByRole("dialog"); - await dialog - .getByRole("button", { name: /Gateway Plumbing/ }) - .first() - .click(); - await dialog.getByRole("button", { name: "Coastal HVAC" }).click(); + await dialog.getByRole("button", { name: "Vinewood LLC" }).click(); + await page.getByRole("button", { name: "Coastal HVAC" }).last().click(); await dialog.getByRole("button", { name: /^save$/i }).click(); await expect(dialog).toBeHidden(); @@ -408,7 +405,7 @@ test.describe("Inline technician registration", () => { await row.getByRole("button", { name: /Vinewood LLC/ }).click(); const dialog = page.getByRole("dialog"); await dialog.getByRole("button", { name: "No technician" }).click(); - await dialog.getByRole("button", { name: "Adam Whyte" }).click(); + await page.getByRole("button", { name: "Adam Whyte" }).last().click(); await expect(page.locator('input[type="tel"]')).toBeVisible(); await dialog.getByRole("button", { name: /^save$/i }).click(); @@ -472,9 +469,9 @@ test.describe("Inline technician registration", () => { await details.getByRole("button", { name: /Coastal HVAC/ }).click(); const assignment = page.getByRole("dialog").last(); await assignment.getByRole("button", { name: "Coastal HVAC" }).click(); - await assignment.getByRole("button", { name: "Vinewood LLC" }).click(); + await page.getByRole("button", { name: "Vinewood LLC" }).last().click(); await assignment.getByRole("button", { name: /select technician/i }).click(); - await assignment.getByRole("button", { name: "No technician" }).click(); + await page.getByRole("button", { name: "No technician" }).last().click(); await assignment.getByRole("button", { name: /^save$/i }).click(); await details.getByRole("button", { name: "Save", exact: true }).click();