// DoD scenario e2e_import_cancel_no_trace (SD-0002 ยง6.8): cancelling at the // preview gate (PUC-3a) leaves no trace โ€” no products, no run in the history. import { expect, test } from "@playwright/test"; import { gotoProducts, signUpWithStorefront, uploadFixture } from "../helpers"; test("e2e_import_cancel_no_trace", async ({ page }) => { await signUpWithStorefront(page); await gotoProducts(page); await uploadFixture(page, "good.csv"); // The preview gate is up. await expect(page.getByRole("heading", { name: "Import preview โ€” good.csv" })).toBeVisible(); await expect(page.getByRole("button", { name: "2 to add" })).toBeVisible(); await page.getByRole("button", { name: "Cancel" }).click(); // Lands back on Products โ€” still the empty state, no run recorded. await expect(page.getByRole("heading", { level: 1, name: "Products" })).toBeVisible(); await expect( page.getByText("No products yet. Bulk import is how product data gets in."), ).toBeVisible(); await expect(page.getByText("No imports yet.")).toBeVisible(); });