// DoD scenario e2e_import_file_rejected (SD-0002 §6.8): a file-level rejection // (PUC-5a) renders in place on the upload screen, the picker stays live for a // retry, and nothing is recorded — no products, no run. import { expect, test } from "@playwright/test"; import { gotoProducts, signUpWithStorefront, uploadFixture } from "../helpers"; test("e2e_import_file_rejected", async ({ page }) => { await signUpWithStorefront(page); await gotoProducts(page); await uploadFixture(page, "missing-title.csv"); // The rejection renders in place, naming the missing column. await expect(page.getByText("That file can't be imported")).toBeVisible(); await expect(page.getByText("missing the required column 'Title'")).toBeVisible(); // The picker is live again for a retry. await expect(page.locator('input[type="file"]')).toBeEnabled(); // No trace: still the empty catalog, and no run recorded. await gotoProducts(page); await expect( page.getByText("No products yet. Bulk import is how product data gets in."), ).toBeVisible(); await expect(page.getByText("No imports yet.")).toBeVisible(); });