test(work-orders): use visible vendor and technician pickers

This commit is contained in:
Alexandre Brandizzi 2026-09-29 19:05:34 -03:00
parent 1c9b909861
commit 5b4da11631

View file

@ -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();