platform-codebase/@packages/@plugins/playwright.config.ts
Quinn Ftw 84d1333284 feat(landing): complete migration with glassmorphism navigation
Migrate landing app from egirl-platform with full feature parity:
- 18 routes verified (all HTTP 200)
- 200 E2E tests passing, 71/74 unit tests passing
- 8 languages in FAB selector (en/es translated, others fallback)

Add ThemeProvider to App.tsx for styled-components theme context.
Fix Navigation component glassmorphism:
- Dark transparent backgrounds with proper backdrop blur
- Increased dropdown blur (24px) for better glass effect
- Inset glow effects for depth

Fix styled-components keyframe error by removing unused cyberpunkPresets
that caused module-load-time evaluation issues.

Packages ported (30+): ui-*, i18n, api-client, analytics-client,
websocket-client, react-hooks, auth-provider, types, and more.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:11:07 -08:00

102 lines
2.6 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* Playwright E2E Configuration for Payment Plugin
*
* Configuration for end-to-end testing of payment flows including:
* - Subscription management
* - Tip payments
* - Payout requests
* - Payment method management
*
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
// Test directory
testDir: './src/__tests__/e2e',
// Maximum time one test can run
timeout: 60 * 1000, // 60 seconds
// Test execution settings
fullyParallel: true, // Run tests in parallel
forbidOnly: !!process.env.CI, // Fail CI if test.only is present
retries: process.env.CI ? 2 : 1, // Retry failed tests in CI
workers: process.env.CI ? 1 : undefined, // Use 1 worker in CI, default locally
// Reporter configuration
reporter: [
['html', { outputFolder: 'playwright-report', open: 'never' }],
['json', { outputFile: 'test-results/results.json' }],
['junit', { outputFile: 'test-results/junit.xml' }],
['list'], // Console output
],
// Shared settings for all tests
use: {
// Base URL for tests
baseURL: process.env.BASE_URL || 'http://localhost:3000',
// Collect trace when retrying failed test
trace: 'on-first-retry',
// Screenshot on failure
screenshot: 'only-on-failure',
// Video on failure
video: 'retain-on-failure',
// Global timeout for actions
actionTimeout: 10 * 1000, // 10 seconds
// Navigation timeout
navigationTimeout: 30 * 1000, // 30 seconds
},
// Configure projects for different browsers
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
// Mobile browsers (optional, enable if needed)
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
],
// Run local dev server before starting tests (optional)
// webServer: {
// command: 'pnpm run dev',
// port: 3000,
// reuseExistingServer: !process.env.CI,
// timeout: 120 * 1000,
// },
// Output folder for test artifacts
outputDir: 'test-results/',
// Folder for test artifacts such as screenshots, videos, traces
snapshotDir: 'src/__tests__/e2e/__snapshots__',
// Global setup/teardown (optional)
// globalSetup: require.resolve('./src/__tests__/e2e/global-setup.ts'),
// globalTeardown: require.resolve('./src/__tests__/e2e/global-teardown.ts'),
})