// DoD scenario e2e_export_download (SD-0002 §6.8): export downloads a canonical // CSV and the status filter is respected. import { expect, test } from "@playwright/test"; import { exportCatalog, gotoProducts, importGoodCsv, signUpWithStorefront } from "../helpers"; test("e2e_export_download", async ({ page }) => { await signUpWithStorefront(page); await gotoProducts(page); await importGoodCsv(page); await gotoProducts(page); // Export "All products" → a canonical CSV with both handles. const all = await exportCatalog(page, "All products"); expect(all.text.split("\n")[0]).toContain("Handle,"); expect(all.text).toContain("moon-mug"); expect(all.text).toContain("star-tee"); // good.csv's products are active → "Active" exports both, "Draft" is empty/disabled-path. const active = await exportCatalog(page, "Active"); expect(active.text).toContain("moon-mug"); });