diff --git a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-add.png b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-add.png index 7f701af7..236a33d9 100644 Binary files a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-add.png and b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-add.png differ diff --git a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-detail.png b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-detail.png index 3b0e6506..c05f2378 100644 Binary files a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-detail.png and b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-detail.png differ diff --git a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-edit.png b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-edit.png index 7291783a..54c553c4 100644 Binary files a/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-edit.png and b/e2e/__screenshots__/vendors/vendors.visual.spec.ts/vendor-edit.png differ diff --git a/e2e/vendors/vendors.spec.ts b/e2e/vendors/vendors.spec.ts index e8f54bef..bd55400c 100644 --- a/e2e/vendors/vendors.spec.ts +++ b/e2e/vendors/vendors.spec.ts @@ -587,10 +587,16 @@ test.describe("Vendor directory prototype parity", () => { await expect(page.getByRole("textbox", { name: "Email (optional)", exact: true })).toHaveValue( "dispatch@gateway.test", ); - await expect(page.getByLabel("Address (optional)")).toHaveValue("1 Market St"); - await expect(page.getByLabel("Google Maps URL (optional)")).toHaveValue( - "https://maps.google.com/gateway", + // SH-271: one combined "Address (optional)" line became three required + // fields, and the hand-pasted Google Maps URL input is gone — the location + // is derived from the address now. + await expect(page.getByRole("combobox", { name: "Street Address (required)" })).toHaveValue( + "1 Market St", ); + await expect(page.getByLabel("City (required)")).toHaveValue("St. Louis"); + await expect(page.getByLabel("State (required)")).toHaveValue("MO"); + await expect(page.getByLabel("Google Maps URL (optional)")).toHaveCount(0); + await expect(page.getByLabel("Address (optional)")).toHaveCount(0); await expect(page.getByLabel("Preferred Contact")).toHaveCount(0); await expect(page.getByLabel("Technician name (optional)")).toHaveCount(1); await expect(page.getByLabel("Technician name (optional)")).toHaveValue(""); @@ -643,9 +649,15 @@ test.describe("Vendor directory prototype parity", () => { await expect(detailDrawer.getByRole("heading", { name: "Adam Whyte" })).toBeVisible(); await expect(detailDrawer.getByText("Adam Whyte")).toBeVisible(); await expect(detailDrawer.getByText("72")).toBeVisible(); - await expect( - detailDrawer.getByRole("link", { name: "Open in Google Maps" }).first(), - ).toHaveAttribute("target", "_blank"); + // SH-271: the separate "Open in Google Maps" row is gone — the Street + // Address itself is the link, built from the structured parts. + const streetLink = detailDrawer.getByRole("link", { name: "1 Market St" }).first(); + await expect(streetLink).toHaveAttribute("target", "_blank"); + await expect(streetLink).toHaveAttribute( + "href", + "https://www.google.com/maps/search/?api=1&query=1%20Market%20St%20St.%20Louis%20MO", + ); + await expect(detailDrawer.getByRole("link", { name: "Open in Google Maps" })).toHaveCount(0); await captureVisual(page, "/tmp/seahaven-vendor-implemented-detail.png"); await detailDrawer.getByRole("button", { name: "Edit" }).click(); @@ -693,6 +705,12 @@ test.describe("Vendor directory prototype parity", () => { ).toBeEnabled(); await page.getByRole("combobox", { name: "Company (required)" }).fill("Independent Vendor LLC"); await page.getByLabel("Company Phone (optional)").fill("3145550199"); + // SH-271 made the structured address required. This test is about keyboard + // dismissal and free-text company creation, so the address is filled to + // leave those as the only things it is exercising. + await page.getByRole("combobox", { name: "Street Address (required)" }).fill("1 Market St"); + await page.getByLabel("City (required)").fill("St. Louis"); + await page.getByLabel("State (required)").fill("MO"); await page.getByRole("button", { name: "Add Vendor", exact: true }).last().click(); await expect.poll(() => state.createdBody?.name).toBe("Independent Vendor LLC");