Files
Portfolio/playwright.config.ts
T
damjan_savicandClaude Opus 4.6 62ae5140b9 Tailwind v4 migration, massive SEO optimization, and fixes
- Migrate to Tailwind CSS v4 with @theme, @layer, @plugin syntax
- Upgrade to Next.js 16.1, React 19.2, TypeScript 5.9.3
- Add 8 technology landing pages (Next.js, React, TypeScript, Tailwind CSS, Claude AI, Python, n8n, KI-Agenten)
- Expand SEO keywords across all locales (de/en/sr) for home, layout, cities, services
- Add tech-specific keywords to all 22 city pages
- Add FAQ schema + seoKeywords to service detail pages
- Add CollectionPage JSON-LD to blog listing
- Fix city page: dynamic region, BASE_URL canonicals, x-default hreflang
- Rewrite terms page with full German AGB, English and Serbian translations
- Remove dead crypto import and unused CSRF middleware (Edge Runtime fix)
- Remove crawlDelay from robots.ts
- Update sitemap with technology pages (~198 indexed URLs)
- Remove deprecated tailwind.config.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:40:19 +01:00

90 lines
2.1 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
/**
* Playwright configuration for E2E and performance testing.
*
* This configuration is optimized for:
* - Chromium-only testing (required for Lighthouse integration)
* - Performance audits with playwright-lighthouse
* - Testing Next.js application across all locales (de, en, sr)
*
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
// Test directory
testDir: './tests/e2e',
// Run tests in files in parallel
fullyParallel: true,
// Fail the build on CI if you accidentally left test.only in the source code
forbidOnly: !!process.env.CI,
// Retry on CI only
retries: process.env.CI ? 2 : 0,
// Limit workers to avoid overwhelming the dev server
workers: process.env.CI ? 1 : 4,
// Reporter to use
reporter: [
['html', { open: 'never' }],
['list'],
],
// Shared settings for all projects
use: {
// Base URL - uses dedicated test port to avoid conflicts with other dev servers
baseURL: 'http://localhost:3100',
// Collect trace when retrying the failed test
trace: 'on-first-retry',
// Take screenshot on failure
screenshot: 'only-on-failure',
},
// Configure projects for E2E testing
// Note: --remote-debugging-port removed to allow parallel test execution.
// For Lighthouse performance tests, use a separate config with a single worker.
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
// Mobile Chrome for responsive testing
{
name: 'mobile-chrome',
use: {
...devices['Pixel 5'],
},
},
// Tablet viewport for responsive testing
{
name: 'tablet',
use: {
viewport: { width: 768, height: 1024 },
},
},
],
// Configure web server to start before tests on a dedicated port
webServer: {
command: 'pnpm dev --port 3100',
url: 'http://localhost:3100',
reuseExistingServer: false,
timeout: 120000,
},
// Global timeout for each test
timeout: 60000,
// Expect timeout
expect: {
timeout: 10000,
},
});