The roof restoration planner has a service path during local development and a dedicated origin in production. A link can work in development while being wrong after deployment if it keeps the development prefix. The shared path helper and the production build assertions give those two environments explicit contracts.
Keep the host and pathname together
The helper checks SITE_NICHE and whether Astro is running in development. When the deployed niche matches the requested slug, its base is slash. For a development link or a different niche, the base starts with the service slug. The canonical for the deployed roof planner uses the roofing hostname and root pathname. The guide uses the same origin and the guide path.
const origin = 'https://roofing.perthquotes.com.au';
const expected = { home: new URL('/', origin), guide: new URL('/guide/', origin) };
// Build checks inspect the rendered home and guide, including canonical links.
assert.ok(homeHtml.includes('rel="canonical" href="' + expected.home.href + '"'));
assert.ok(guideHtml.includes('rel="canonical" href="' + expected.guide.href + '"'));
assert.ok(homeHtml.includes('href="/guide/"'));
Validate the built artifact
The site build matrix already checks host-specific canonicals and the local guide link. Its rendering checks catch a deployment configuration mistake even when a single development server can render all the routes. For a focused review, inspect the roof niche build's index.html, guide/index.html and sitemap.xml and confirm the sitemap URLs point to that same origin. For a browser regression, follow the guide and verify that the origin remains stable.
Keep the tests at both levels. A helper test can cover its branch logic quickly, while inspection of built pages catches a wrong hostname or route reaching the document head. The planner itself records a project category and roof type. Its canonical URL identifies the page, without conveying any property-specific assessment.
A second production assertion can check the sitemap includes the guide and excludes the privacy page. A successful build gives evidence about the files shipped. Search indexing is a later outcome that the assertion cannot establish.
Perth Quotes roof restoration planner is the live preview. Online enquiries are closed.
Top comments (0)