Make demo search, filters, exports, and controls functional while exposing dedicated KPI detail pages with tested breakdowns. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,22 @@ test("shows inventory intelligence overview", async ({ page }) => {
|
||||
await expect(page.getByText("Freshness watchlist")).toBeVisible();
|
||||
});
|
||||
|
||||
test("opens every overview metric drill-down", async ({ page }) => {
|
||||
const metrics = [
|
||||
{ label: "Inventory value", path: "/metrics/inventory-value", heading: "Inventory value" },
|
||||
{ label: "Revenue · 30 days", path: "/metrics/revenue", heading: "Revenue · 30 days" },
|
||||
{ label: "At-risk exposure", path: "/metrics/at-risk", heading: "At-risk exposure" },
|
||||
{ label: "Average freshness", path: "/metrics/freshness", heading: "Average freshness" },
|
||||
];
|
||||
|
||||
for (const metric of metrics) {
|
||||
await page.goto("/");
|
||||
await page.getByRole("link", { name: `View details for ${metric.label}` }).click();
|
||||
await expect(page).toHaveURL(metric.path);
|
||||
await expect(page.getByRole("heading", { name: metric.heading })).toBeVisible();
|
||||
}
|
||||
});
|
||||
|
||||
test("moves from inventory to a product", async ({ page }) => {
|
||||
await page.goto("/inventory");
|
||||
await expect(page.getByRole("heading", { name: "Inventory" })).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user