feat: Add Playwright testing scaffolding infrastructure
Implements complete Playwright testing infrastructure for manual MCP testing and as foundation for Magnitude tests. Created: - playwright.config.ts - Main configuration with setup project - tests/playwright/auth.setup.ts - Authentication setup (placeholder) - tests/playwright/fixtures.ts - Custom fixtures for authenticated/page contexts - tests/playwright/helpers/chat.ts - Chat interaction helpers - tests/playwright/helpers/galaxy.ts - Galaxy visualization helpers - tests/playwright/helpers/node.ts - Node creation/management helpers - tests/playwright/smoke.spec.ts - Basic smoke tests - .env.test - Environment variables template Updated: - package.json - Added test:playwright scripts - .gitignore - Added tests/playwright/.auth/ exclusion Ready for manual Playwright MCP testing and Magnitude test creation. Resolves plan: 01-playwright-scaffolding.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,40 +1,35 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
testDir: './tests/playwright',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: 'html',
|
||||
|
||||
use: {
|
||||
baseURL: 'http://localhost:3000',
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000',
|
||||
trace: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
|
||||
projects: [
|
||||
// Setup project
|
||||
{
|
||||
name: 'setup',
|
||||
testMatch: /.*\.setup\.ts/,
|
||||
},
|
||||
|
||||
// Chromium tests using authenticated state
|
||||
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
|
||||
{
|
||||
name: 'chromium',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
// Use the saved authenticated state
|
||||
storageState: '.playwright/.auth/user.json',
|
||||
storageState: 'tests/playwright/.auth/user.json',
|
||||
},
|
||||
dependencies: ['setup'],
|
||||
},
|
||||
],
|
||||
|
||||
// Run dev server before tests
|
||||
webServer: {
|
||||
command: 'pnpm dev',
|
||||
url: 'http://localhost:3000',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120000,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user