mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 05:03:13 +00:00
test(work-orders): exercise reachable completion controls
This commit is contained in:
parent
5b4da11631
commit
fdbb602e0c
1 changed files with 6 additions and 2 deletions
|
|
@ -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 ({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue