Files
websitedev/proto/playwright.config.ts
T
Do SikiandClaude Opus 5.5 dc7a777d9f feat(deploy): indexability guard and production SEO launch suite (MITHOME-127)
The staging noindex (MITHOME-116) hinges on a build variable; leaking it
into production would silently drop the site from Google. deploy.sh now
refuses to build production when NEXT_PUBLIC_DEPLOY_ENV=staging is set,
and after every deploy runs scripts/check-indexability.sh, expecting an
indexable production and a blocked staging (node tests cover both ways,
stray noindex and unreachable endpoints; added to pre-deploy tests).

A separate Playwright project, production-seo (npm run
test:seo:production), checks robots.txt, that all 12 sitemap URLs are
final/indexable with self canonicals and sitemap hreflangs, SSR content
and links, the / -> /hu redirect and real 404s; host redirects are gated
until the production domain is live. Verified on a production-mode build
of a staging DB copy (5 passed) and failing as expected against staging.

eslint now ignores generated test output (playwright-report, test-results,
coverage), which broke the pre-deploy lint after local e2e runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 13:23:23 +02:00

29 lines
919 B
TypeScript

import { defineConfig, devices } from '@playwright/test'
// MITHOME-127: two projects with opposite indexing expectations —
// `staging` (smoke, expects noindex) and `production-seo` (expects an
// indexable site). BASE_URL overrides the target of either.
export default defineConfig({
testDir: './e2e',
timeout: 30_000,
retries: process.env.CI ? 1 : 0,
reporter: [['list'], ['html', { open: 'never' }]],
use: {
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'staging',
testMatch: 'staging-smoke.spec.ts',
use: { ...devices['Desktop Chrome'], baseURL: process.env.BASE_URL || 'https://stage.mozdit.hu' },
},
{
name: 'production-seo',
testMatch: 'production-seo.spec.ts',
use: { ...devices['Desktop Chrome'], baseURL: process.env.BASE_URL || 'https://mozdit.hu' },
},
],
})