Skip to content

Commit 698a56c

Browse files
authored
localise listing seo metadata (#75)
* localise listing seo metadata * avoid residential seo name leaks * noindex residential listing pages * add listing item json ld * anon listings protection * tighten seo faq and privacy coverage * fix listing teaser display sanitisation * tighten seo review follow-ups * localise listing json ld labels * localise listing display fallbacks * treat unknown listings as sensitive * fix residential seo copy fallbacks * separate community and business seo copy * clarify sensitive listing teaser * simplify listing seo connect copy * avoid residential listing title in seo connect * enforce residential listing name null
1 parent 53e2ca5 commit 698a56c

30 files changed

Lines changed: 1804 additions & 309 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ npm run test:e2e:prod
293293

294294
Use the local anon key that matches the running local Supabase stack. Do not mix the hosted project URL with the local anon key, or the local URL with a hosted anon key.
295295

296-
The production-like Playwright config starts its own `next start` server so it does not accidentally reuse a stray `next dev` process on port `3000`.
296+
By default, Playwright starts its own app server on `127.0.0.1:3001`, so it does not collide with the usual local `next dev` server on port `3000`. Set `PLAYWRIGHT_PORT` if you need a different port.
297297

298298
In CI, pull requests run `npm run check` and `npm run build`. Pushes to `main` also run the production-like Playwright smoke suite.
299299

e2e/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function signIn(
2828
await page.locator("#email").fill(email);
2929
await page.locator("#password").fill(SEEDED_PASSWORD);
3030

31-
const expectedUrl = new URL(expectedPath, "http://127.0.0.1:3000");
31+
const expectedUrl = new URL(expectedPath, page.url());
3232

3333
await Promise.all([
3434
page.waitForURL(

e2e/i18n.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,15 @@ test("public footer locale picker ignores stale auth cookies", async ({
5252
baseURL,
5353
page,
5454
}) => {
55+
if (typeof baseURL !== "string") {
56+
throw new Error("Expected Playwright baseURL to be configured");
57+
}
58+
5559
await page.context().addCookies([
5660
{
5761
name: "sb-stale-auth-token",
5862
value: "stale",
59-
url: baseURL ?? "http://127.0.0.1:3000",
63+
url: baseURL,
6064
httpOnly: true,
6165
sameSite: "Lax",
6266
},

e2e/map.spec.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@ const INNER_WEST_MAP_VIEW: StoredMapView = {
1515
};
1616
const MAP_MARKER_RENDER_TIMEOUT_MS = 20_000;
1717

18+
function getMapCookieUrl() {
19+
const baseURL = test.info().project.use.baseURL;
20+
21+
if (typeof baseURL !== "string") {
22+
throw new Error("Expected Playwright baseURL to be configured");
23+
}
24+
25+
return new URL("/map", baseURL).toString();
26+
}
27+
1828
async function seedStoredMapView(page: Page, view: StoredMapView) {
1929
await page.context().addCookies([
2030
{
2131
name: STORED_MAP_VIEW_KEY,
2232
value: encodeURIComponent(JSON.stringify(view)),
23-
url: "http://127.0.0.1:3000/map",
33+
url: getMapCookieUrl(),
2434
},
2535
]);
2636

@@ -54,7 +64,7 @@ async function readStoredMapView(page: Page) {
5464
}
5565

5666
async function readStoredMapViewCookie(page: Page) {
57-
const cookies = await page.context().cookies("http://127.0.0.1:3000/map");
67+
const cookies = await page.context().cookies(getMapCookieUrl());
5868
const cookie = cookies.find(({ name }) => name === STORED_MAP_VIEW_KEY);
5969

6070
return cookie

0 commit comments

Comments
 (0)