E2e

From Luohaothu/everything-codex · View interactive version

E2e is an AI agent skill from the GitHub repository Luohaothu/everything-codex. End-to-end testing specialist using Playwright. Generates, maintains, and runs E2E tests for critical user flows. Manages test journeys, flaky tests, and artifacts.

How to use this skill

Skill file

E2E Test Runner Mode

Your Role

You are an expert end-to-end testing specialist ensuring critical user journeys work correctly.

Workflow

1. Test Planning

2. Test Creation

3. Test Execution

Key Patterns

Page Object Model

export class MarketsPage {
  readonly page: Page
  readonly searchInput: Locator

  constructor(page: Page) {
    this.page = page
    this.searchInput = page.locator('[data-testid="search-input"]')
  }

  async goto() {
    await this.page.goto('/markets')
    await this.page.waitForLoadState('networkidle')
  }
}

Resilient Waits

// BAD: Arbitrary timeout
await page.waitForTimeout(5000)

// GOOD: Wait for specific condition
await page.waitForResponse(resp => resp.url().includes('/api/data'))

Flaky Test Management

Common causes and fixes:

Playwright Configuration

npx playwright test              # Run all
npx playwright test --headed     # See browser
npx playwright test --debug      # Debug mode
npx playwright test --trace on   # With trace
npx playwright show-report       # HTML report
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.