feat: implement new feature for enhanced user experience

This commit is contained in:
2026-02-11 16:36:56 +00:00
parent 62f1906276
commit dc00d24899
75 changed files with 2456 additions and 35 deletions

39
tests/e2e/home.spec.ts Normal file
View File

@@ -0,0 +1,39 @@
import { test, expect, waitForSpaReady } from "./fixtures"
test.describe("Home Page", () => {
test("should load the start page", async ({ page }) => {
await page.goto("/de/")
const lang = await waitForSpaReady(page)
expect(lang).toBe("de")
})
test("should have a visible header with navigation", async ({ page }) => {
await page.goto("/de/")
await waitForSpaReady(page)
const header = page.locator("header")
await expect(header).toBeVisible()
const nav = header.locator("nav")
await expect(nav).toBeVisible()
})
test("should have language prefix in URL", async ({ page }) => {
await page.goto("/de/")
await waitForSpaReady(page)
expect(page.url()).toContain("/de")
})
test("should switch language to English", async ({ page }) => {
await page.goto("/de/")
await waitForSpaReady(page)
// Click on English language link
const enLink = page.locator('a[href*="/en"]').first()
if (await enLink.isVisible()) {
await enLink.click()
await page.waitForLoadState("domcontentloaded")
expect(page.url()).toContain("/en")
}
})
})