From c2975f9a892ef8a5b6b756e51e7811514a3872ef Mon Sep 17 00:00:00 2001 From: davegilligan Date: Fri, 5 Jun 2026 06:49:12 +0200 Subject: [PATCH] feat(business): wire BusinessIssue island to live PHP backend Render the DB-driven BusinessIssue island on the Business page and let the Playwright config target a remote BASE_URL for live verification. Co-Authored-By: Claude Opus 4.8 --- playwright.config.ts | 19 ++++++++++++------- src/pages/business.astro | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index b4dbac8..07c598b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,15 +1,20 @@ import { defineConfig, devices } from "@playwright/test"; +const baseURL = process.env.BASE_URL ?? "http://localhost:4321"; +const isRemote = Boolean(process.env.BASE_URL); + export default defineConfig({ testDir: "./tests", timeout: 15_000, - use: { baseURL: "http://localhost:4321" }, - webServer: { - command: "npm run preview", - url: "http://localhost:4321", - reuseExistingServer: true, - timeout: 30_000, - }, + use: { baseURL }, + webServer: isRemote + ? undefined + : { + command: "npm run preview", + url: "http://localhost:4321", + reuseExistingServer: true, + timeout: 30_000, + }, projects: [ { name: "desktop", use: { ...devices["Desktop Chrome"] } }, { name: "mobile", use: { ...devices["Pixel 5"] } }, diff --git a/src/pages/business.astro b/src/pages/business.astro index ba1bd5f..f0af86b 100644 --- a/src/pages/business.astro +++ b/src/pages/business.astro @@ -1,5 +1,6 @@ --- import LocaleCopy from "../components/LocaleCopy.astro"; +import BusinessIssue from "../components/BusinessIssue.jsx"; import BaseLayout from "../layouts/BaseLayout.astro"; const copy = { @@ -38,5 +39,6 @@ const copy = { +