mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-09-30 04:33:15 +00:00
* feat(web): fix shell chrome, logo home, and live nav badges Refs: AP-42 * feat(web): add invoice grid lines and bold headers Refs: AP-44 * feat(web): support auto row height for multi-line invoice cells Refs: AP-44 * feat(web): expand mock invoice fields for Stampli column catalog Refs: AP-47 * feat(web): add multi-line Stampli invoice cell renderers Refs: AP-47 * fix(web): address review feedback * ci: remove the pr policy caller * fix(web): keep mock catalog dates and updates in sync * fix(web): derive mock action labels from invoice status * fix(ci): drop the unused catalog refresh index * fix(ci): format invoice mock helpers
72 lines
2.7 KiB
TypeScript
72 lines
2.7 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test.describe("dashboard grids", () => {
|
|
test("home page shows brand and three invoice grids", async ({ page }) => {
|
|
await page.goto("/");
|
|
|
|
await expect(page.getByTestId("app-wordmark")).toContainText("STAMPLI");
|
|
await expect(page.getByTestId("mocks-status")).toContainText("Mocks enabled");
|
|
|
|
await expect(
|
|
page.getByTestId("grid-pending").locator(".MuiDataGrid-row").first(),
|
|
).toBeVisible();
|
|
|
|
await page.getByTestId("tab-ready").click();
|
|
await expect(page.getByTestId("grid-ready").locator(".MuiDataGrid-row").first()).toBeVisible();
|
|
|
|
await page.getByTestId("tab-all").click();
|
|
await expect(page.getByTestId("grid-all").locator(".MuiDataGrid-row").first()).toBeVisible();
|
|
});
|
|
|
|
test("payment processing select to pay is reachable from module rail", async ({ page }) => {
|
|
await page.goto("/");
|
|
await page.getByTestId("nav-payment-processing").click();
|
|
await expect(page.getByTestId("payment-processing")).toBeVisible();
|
|
await expect(page.getByTestId("tab-select-to-pay")).toBeVisible();
|
|
await expect(
|
|
page.getByTestId("grid-select-to-pay").locator(".MuiDataGrid-row").first(),
|
|
).toBeVisible();
|
|
});
|
|
|
|
test("ready to pay supports selection, create pay run stub, and pay-date edit", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/");
|
|
await page.getByTestId("tab-ready").click();
|
|
|
|
const createPayRun = page.getByTestId("create-pay-run");
|
|
await expect(createPayRun).toBeDisabled();
|
|
|
|
const readyGrid = page.getByTestId("grid-ready");
|
|
await readyGrid.locator(".MuiDataGrid-row").first().getByRole("checkbox").click();
|
|
await expect(createPayRun).toBeEnabled();
|
|
|
|
await createPayRun.click();
|
|
await expect(page.getByTestId("create-pay-run-snackbar")).toContainText(
|
|
"Pay run stub: 1 invoice(s) selected",
|
|
);
|
|
|
|
await readyGrid.locator('input[aria-label="Select all rows"]').click();
|
|
await expect(createPayRun).toBeEnabled();
|
|
await createPayRun.click();
|
|
await expect(page.getByTestId("create-pay-run-snackbar")).toContainText(
|
|
/Pay run stub: [2-9]\d* invoice\(s\) selected/,
|
|
);
|
|
|
|
const payDateCell = readyGrid.locator('[data-field="payDate"]').nth(1);
|
|
await payDateCell.dblclick();
|
|
const editor = readyGrid
|
|
.locator('input[name="payDate"], .MuiDataGrid-editInputCell input')
|
|
.first();
|
|
await editor.fill("2026-09-01");
|
|
await editor.press("Enter");
|
|
|
|
await expect(payDateCell).toContainText("09/01/2026");
|
|
|
|
await page.getByTestId("tab-pending").click();
|
|
await page.getByTestId("tab-ready").click();
|
|
await expect(
|
|
page.getByTestId("grid-ready").locator('[data-field="payDate"]').nth(1),
|
|
).toContainText("09/01/2026");
|
|
});
|
|
});
|