test(e2e): stand up Playwright — fresh-DB server harness + sign-up helper
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// 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();
|
||||
});
|
||||
Reference in New Issue
Block a user