Files
wiggleverse-ecomm/e2e/tests/smoke.spec.ts
T

21 lines
1.0 KiB
TypeScript

// Harness smoke (Task 15): the full sign-up journey lands in the admin, and the
// products section's empty state renders with its import affordances. The four
// SD-0002 scenario specs build on these helpers.
import { expect, test } from "@playwright/test";
import { gotoProducts, signUpWithStorefront, STOREFRONT_NAME } from "../helpers";
test("smoke: sign up, storefront, products nav", async ({ page }) => {
await signUpWithStorefront(page);
// Admin topbar: storefront identity + the signed-in account chip.
await expect(page.locator(".storeid__name")).toHaveText(STOREFRONT_NAME);
await expect(page.getByRole("button", { name: "Sign out" })).toBeVisible();
await gotoProducts(page);
// Empty state + the import affordances (SD-0002 §5.2).
await expect(page.getByText("No products yet. Bulk import is how product data gets in.")).toBeVisible();
await expect(page.getByRole("link", { name: "Import products" }).first()).toBeVisible();
await expect(page.getByRole("link", { name: "Download sample CSV" })).toBeVisible();
});