mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-06 03:02:03 +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,
|
page,
|
||||||
}) => {
|
}) => {
|
||||||
const writes: Captured[] = [];
|
const writes: Captured[] = [];
|
||||||
await mockApi(page, writes);
|
await mockApi(page, writes, [{ ...BOARD_ROW, lifecycleStatusLabel: "In Progress" }]);
|
||||||
await page.goto("/workorders");
|
await page.goto("/workorders");
|
||||||
|
|
||||||
const row = page.locator("#wo-row-1");
|
const row = page.locator("#wo-row-1");
|
||||||
|
|
@ -394,6 +394,7 @@ test.describe("Inline technician registration", () => {
|
||||||
const writes: Captured[] = [];
|
const writes: Captured[] = [];
|
||||||
const unassigned = {
|
const unassigned = {
|
||||||
...BOARD_ROW,
|
...BOARD_ROW,
|
||||||
|
lifecycleStatusLabel: "In Progress",
|
||||||
technicianAssigned: false,
|
technicianAssigned: false,
|
||||||
techName: null,
|
techName: null,
|
||||||
techPhone: null,
|
techPhone: null,
|
||||||
|
|
@ -490,8 +491,11 @@ test.describe("Inline technician registration", () => {
|
||||||
await reloadedRow.getByRole("button", { name: "View details" }).click();
|
await reloadedRow.getByRole("button", { name: "View details" }).click();
|
||||||
const reloadedDetails = page.getByRole("dialog", { name: "Work order details" });
|
const reloadedDetails = page.getByRole("dialog", { name: "Work order details" });
|
||||||
await expect(reloadedDetails).toBeVisible();
|
await expect(reloadedDetails).toBeVisible();
|
||||||
|
await reloadedDetails.getByRole("button", { name: "Edit WO" }).click();
|
||||||
await reloadedDetails.getByRole("button", { name: /Vinewood LLC/ }).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 ({
|
test("cancelling the wizard after staging a technician writes no vendor (SH-366)", async ({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue