mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 20:54:11 +00:00
Tests: - Update frontend.e2e.spec.ts with locale testing - Add search.e2e.spec.ts for search functionality - Add i18n.int.spec.ts for localization tests - Add search.int.spec.ts for search integration - Update playwright.config.ts Documentation: - Add CLAUDE.md with project instructions - Add docs/ directory with detailed documentation - Add scripts/ for utility scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { test, expect, Page } from '@playwright/test'
|
|
|
|
test.describe('Frontend', () => {
|
|
let page: Page
|
|
|
|
test.beforeAll(async ({ browser }, testInfo) => {
|
|
const context = await browser.newContext()
|
|
page = await context.newPage()
|
|
})
|
|
|
|
test('can go on homepage (default locale redirect)', async ({ page }) => {
|
|
// Root redirects to default locale /de
|
|
await page.goto('/')
|
|
|
|
// Title should contain "Payload CMS" (from localized SiteSettings or default)
|
|
await expect(page).toHaveTitle(/Payload/)
|
|
|
|
// Check page loaded successfully (status 200)
|
|
const response = await page.goto('/')
|
|
expect(response?.status()).toBeLessThan(400)
|
|
})
|
|
|
|
test('can access German locale page', async ({ page }) => {
|
|
await page.goto('/de')
|
|
|
|
// Should load without error
|
|
const response = await page.goto('/de')
|
|
expect(response?.status()).toBeLessThan(400)
|
|
})
|
|
|
|
test('can access English locale page', async ({ page }) => {
|
|
await page.goto('/en')
|
|
|
|
// Should load without error
|
|
const response = await page.goto('/en')
|
|
expect(response?.status()).toBeLessThan(400)
|
|
})
|
|
})
|