// DoD scenario e2e_import_shopify_dialect (SD-0002 §6.8, SLICE-8): a Shopify // product CSV imports directly (PUC-6). Upload an unmodified-shape Shopify export; // the preview recognizes the dialect ("Shopify product CSV — mapped"), lists the // columns with no canonical home as not-imported, and the import confirms and // completes — the run report card carrying the same dialect label. import { expect, test } from "@playwright/test"; import { gotoProducts, signUpWithStorefront, uploadFixture } from "../helpers"; test("e2e_import_shopify_dialect", async ({ page }) => { await signUpWithStorefront(page); await gotoProducts(page); await uploadFixture(page, "shopify-export.csv"); // Preview (§5.4): the file name, the recognized dialect, and the not-imported band. await expect( page.getByRole("heading", { name: "Import preview — shopify-export.csv" }), ).toBeVisible(); await expect(page.getByText("Shopify product CSV — mapped")).toBeVisible(); // The not-imported band lists Shopify columns with no canonical home. Assert a // column that never appears in canonical diff detail, so the match is unambiguous. await expect(page.getByText("Columns not imported")).toBeVisible(); await expect(page.getByText("Variant Compare At Price")).toBeVisible(); await expect(page.getByRole("button", { name: "1 to add" })).toBeVisible(); await expect(page.getByRole("button", { name: "0 errors" })).toBeVisible(); // Consent gate (PUC-3): confirm the import. await page.getByRole("button", { name: "Import 1 products" }).click(); // Run detail (§5.5): report card carries the same dialect label and completes. await expect(page.getByRole("heading", { level: 1, name: "shopify-export.csv" })).toBeVisible(); await expect(page.getByText("Shopify product CSV — mapped")).toBeVisible(); await expect(page.getByText("1 added · 0 updated · 0 rows in error")).toBeVisible(); await expect(page.getByText("Complete", { exact: true })).toBeVisible(); });