fix: resolve contact form and page slug translation mismatch causing E2E test failures
Some checks failed
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Failing after 6s
Build & Deploy / 🔍 Prepare (push) Successful in 14s
Build & Deploy / 🧪 QA (push) Failing after 1m31s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s
Some checks failed
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Failing after 6s
Build & Deploy / 🔍 Prepare (push) Successful in 14s
Build & Deploy / 🧪 QA (push) Failing after 1m31s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s
This commit is contained in:
@@ -33,8 +33,14 @@ describe('Contact Form E2E', () => {
|
||||
it('should submit the contact form and show success message', async ({ skip }) => {
|
||||
if (!isServerUp) skip();
|
||||
|
||||
page.on('console', (msg) => console.log('PAGE LOG:', msg.text()));
|
||||
page.on('pageerror', (err) => console.error('PAGE ERROR:', err.message));
|
||||
|
||||
await page.goto(`${BASE_URL}/de/kontakt`);
|
||||
|
||||
// Wait for Next.js hydration to complete
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
|
||||
// Fill the form
|
||||
await page.waitForSelector('input[name="name"]');
|
||||
await page.type('input[name="name"]', 'E2E Tester');
|
||||
@@ -45,7 +51,7 @@ describe('Contact Form E2E', () => {
|
||||
await page.click('button[type="submit"]');
|
||||
|
||||
// Wait for success message (localized or generic)
|
||||
await page.waitForSelector('[role="alert"]', { timeout: 10000 });
|
||||
await page.waitForSelector('[role="alert"]', { timeout: 15000 });
|
||||
|
||||
const text = await page.evaluate(() => document.body.innerText);
|
||||
expect(text).toMatch(/Gesendet|Sent|Erfolgreich|Success/i);
|
||||
|
||||
Reference in New Issue
Block a user