From 216555171147a41c1dfc08094970386b6fc4158a Mon Sep 17 00:00:00 2001 From: Do Siki Date: Tue, 29 Sep 2026 01:40:34 +0200 Subject: [PATCH] test(e2e): smoke-check hero CTA target in both locales (MITHOME-123) Co-Authored-By: Claude Opus 5.5 --- proto/e2e/staging-smoke.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/proto/e2e/staging-smoke.spec.ts b/proto/e2e/staging-smoke.spec.ts index 19fdc72..f45e1d9 100644 --- a/proto/e2e/staging-smoke.spec.ts +++ b/proto/e2e/staging-smoke.spec.ts @@ -51,6 +51,18 @@ test('SMOKE-04: service content and contact CTA are visible', async ({ page }) = await expect(page.getByRole('link', { name: /kérjen ajánlatot/i })).toHaveAttribute('href', '/hu/kapcsolat') }) +// MITHOME-123 regression: SMOKE-02 only checked the hero CTA was visible, +// so its stale "/kapcsolat" target (404) went unnoticed. +for (const [locale, contactPath] of [['hu', '/hu/kapcsolat'], ['en', '/en/contact']] as const) { + test(`SMOKE-06-${locale}: hero CTA opens the ${locale} contact page`, async ({ page }) => { + await page.goto(`/${locale}`) + const cta = page.locator('section').first().locator('a.btn-primary').first() + await expect(cta).toHaveAttribute('href', contactPath) + const response = await page.request.get(contactPath) + expect(response.status()).toBe(200) + }) +} + test('SMOKE-05: empty contact form is blocked client-side without API submission', async ({ page }) => { let contactPostCount = 0 page.on('request', request => {