Files
Profa 494cb11c1f feat: Add comprehensive E2E test suite for agentics.org
Added complete Playwright-based E2E testing infrastructure with 36 tests
covering functional, responsive, accessibility, and performance testing.

**Test Infrastructure:**
- Playwright config with 7 browser/device configurations
- Page Object Model for maintainable test code
- npm scripts for various test execution modes

**Test Suites (36 tests total):**
- homepage.spec.ts: 14 functional tests (navigation, hero, stats, CTAs)
- responsive.spec.ts: 5 responsive design tests (mobile, tablet, desktop)
- accessibility.spec.ts: 10 WCAG 2.1 AA compliance tests
- performance.spec.ts: 7 performance and Web Vitals tests

**Documentation:**
- E2E-TEST-PLAN.md: Comprehensive 15-section test strategy (700+ lines)
- README.md: Complete usage guide (300+ lines)
- QUICKSTART.md: 5-minute setup guide
- DELIVERABLES.md: Detailed deliverables summary

**Key Features:**
- Based on real content crawled from live site
- TypeScript for type safety
- axe-core integration for accessibility testing
- Screenshot and video capture on failure
- CI/CD ready with GitHub Actions example
- Cross-browser: Chrome, Firefox, Safari, Edge, Mobile
- Responsive: Mobile (iPhone 12), Tablet (iPad), Desktop

**Test Coverage:**
✅ All 7 navigation items
✅ Hero section with community stats (100K+ members)
✅ 4 explore cards (About, Impact, Community, Projects)
✅ 7 Paths of Impact
✅ "What is Agentic AI" section
✅ Community stats (130K+ Reddit, 52K+ LinkedIn, 3K+ Discord)
✅ SEO metadata and Open Graph tags
✅ HTTPS enforcement
✅ Footer and copyright

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 18:18:45 +00:00

111 lines
2.4 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
/**
* Playwright configuration for Agentics.org E2E testing
*
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './tests',
// Maximum time one test can run
timeout: 30 * 1000,
// 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,
// Opt out of parallel tests on CI
workers: process.env.CI ? 1 : undefined,
// Reporter to use
reporter: [
['html', { outputFolder: 'playwright-report' }],
['json', { outputFile: 'test-results/results.json' }],
['junit', { outputFile: 'test-results/junit.xml' }],
['list']
],
// Shared settings for all the projects below
use: {
// Base URL to use in actions like `await page.goto('/')`
baseURL: 'https://agentics.org',
// Collect trace when retrying the failed test
trace: 'on-first-retry',
// Screenshot on failure
screenshot: 'only-on-failure',
// Video on failure
video: 'retain-on-failure',
// Maximum time each action such as `click()` can take
actionTimeout: 10 * 1000,
// Navigation timeout
navigationTimeout: 30 * 1000,
},
// Configure projects for major browsers
projects: [
// Desktop browsers
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1920, height: 1080 }
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
viewport: { width: 1920, height: 1080 }
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
viewport: { width: 1920, height: 1080 }
},
},
{
name: 'edge',
use: {
...devices['Desktop Edge'],
viewport: { width: 1920, height: 1080 }
},
},
// Mobile browsers
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] },
},
// Tablet browsers
{
name: 'iPad',
use: { ...devices['iPad Pro'] },
},
],
// Run local dev server before starting the tests (optional)
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});