mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-09-30 05:43:18 +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 Action and Vendor filters to invoice processing Refs: AP-43 * feat(web): add multi-line Stampli invoice cell renderers Refs: AP-47 * feat(web): align filter toolbar layout, field shapes, and tabs Refs: AP-43 * fix(web): address review feedback * fix(web): address review feedback * ci: remove the pr policy caller * fix(web): keep mock catalog dates and updates in sync * fix(web): render the attention banner as text * fix(web): make the attention banner non-interactive copy * fix(web): derive mock action labels from invoice status * fix(web): restore link-style attention banner copy * fix(ci): drop the unused catalog refresh index * fix(ci): format invoice mock helpers * fix(web): count filtered rows on invoice tabs * fix(web): match the filter toolbar to MUI 9
24 lines
1.2 KiB
TypeScript
24 lines
1.2 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test.describe("Invoice Processing filters (AP-43)", () => {
|
|
test("Action and Vendor filters reduce grid rows and badge counts", async ({ page }) => {
|
|
await page.goto("/");
|
|
const grid = page.getByTestId("grid-pending");
|
|
await expect(grid.locator(".MuiDataGrid-row").first()).toBeVisible();
|
|
const before = await grid.locator(".MuiDataGrid-row").count();
|
|
expect(before).toBeGreaterThan(0);
|
|
|
|
await expect(page.getByTestId("action-filter").getByPlaceholder("Search")).toBeVisible();
|
|
await page.getByTestId("action-filter").click();
|
|
await page.getByRole("option", { name: "Approve invoice" }).click();
|
|
await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("1");
|
|
|
|
await page.getByTestId("vendor-filter").fill("Harbor");
|
|
await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("2");
|
|
await expect(grid.locator(".MuiDataGrid-row")).toHaveCount(1);
|
|
await expect(page.getByTestId("tab-pending").locator("span").last()).toHaveText("1");
|
|
await expect(page.getByTestId("attention-banner")).toContainText(
|
|
"1 invoices require approval. Show invoices ready to approve.",
|
|
);
|
|
});
|
|
});
|