diff --git a/e2e/work-orders/inline-technician.spec.ts b/e2e/work-orders/inline-technician.spec.ts index f24acbd6..41a7ffed 100644 --- a/e2e/work-orders/inline-technician.spec.ts +++ b/e2e/work-orders/inline-technician.spec.ts @@ -284,7 +284,7 @@ test.describe("Inline technician registration", () => { page, }) => { const writes: Captured[] = []; - await mockApi(page, writes); + await mockApi(page, writes, [{ ...BOARD_ROW, lifecycleStatusLabel: "In Progress" }]); await page.goto("/workorders"); const row = page.locator("#wo-row-1"); @@ -394,6 +394,7 @@ test.describe("Inline technician registration", () => { const writes: Captured[] = []; const unassigned = { ...BOARD_ROW, + lifecycleStatusLabel: "In Progress", technicianAssigned: false, techName: null, techPhone: null, @@ -490,8 +491,11 @@ test.describe("Inline technician registration", () => { await reloadedRow.getByRole("button", { name: "View details" }).click(); const reloadedDetails = page.getByRole("dialog", { name: "Work order details" }); await expect(reloadedDetails).toBeVisible(); + await reloadedDetails.getByRole("button", { name: "Edit WO" }).click(); await reloadedDetails.getByRole("button", { name: /Vinewood LLC/ }).click(); - await expect(reloadedDetails.getByRole("button", { name: "No technician" })).toBeVisible(); + await expect( + page.getByRole("dialog").last().getByRole("button", { name: "No technician" }), + ).toBeVisible(); }); test("cancelling the wizard after staging a technician writes no vendor (SH-366)", async ({