with one click
e2e
Imported from everything-codex command e2e
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Imported from everything-codex command e2e
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
AI-native code annotation protocol that encodes intent, risk, dependencies, constraints, and test expectations in machine-parseable comments.
Professional Codex-native multi-agent code review with confidence scoring
ๆถๆ่งๅไธๅฎถ - ไฝฟ็จ Codex ๆฌๅฐไธไธๆใไปๅบ่ฏๆฎๅๅช่ฏป child agent ่ฟ่กๅคงๅ็ณป็ปๆถๆ่ฎพ่ฎกไธ่งๅใ
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
Imported from everything-codex command checkpoint
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
| name | e2e |
| description | Imported from everything-codex command e2e |
| version | 0.1.0 |
| source | fork |
| checksum | 2e8eb4e7ac3ffdf30047484ab9a89375834d24df14193693dec68dbd2ffba691 |
| updated_at | "2026-02-11T01:29:16.000Z" |
| intent | testing |
| layer | domain |
Codex supports native subagents. Delegate with spawn_agent, coordinate with send_input, collect via wait_agent, and clean up with close_agent.
Execution preference:
[ANALYST]/[ARCHITECT]/[EXECUTOR]/[REVIEWER] structure in a single response.Minimal orchestration pattern:
spawn_agent -> send_input (optional) -> wait_agent -> close_agent
This command invokes the e2e-runner agent to generate, maintain, and execute end-to-end tests using Playwright.
Use $e2e when:
tdd and electron-driverUse $e2e as the top-level E2E orchestrator:
$tdd covers unit and integration tests first.$e2e covers cross-layer user journeys.$electron-driver for runtime driving while keeping Playwright-style assertions and artifacts.Electron routing signals:
electron in package dependencies or scriptsThe e2e-runner agent will:
User: $e2e Test the market search and view flow
Agent (e2e-runner):
# E2E Test Generation: Market Search and View Flow
## Test Scenario Identified
**User Journey:** Market Search โ View Results โ Click Market โ View Details
**Test Coverage:**
1. Navigate to markets page
2. Perform semantic search
3. Verify search results
4. Click on first result
5. Verify market details page loads
6. Verify chart renders
## Generated Test Code
```typescript
// tests/e2e/markets/search-and-view.spec.ts
import { test, expect } from '@playwright/test'
import { MarketsPage } from '../../pages/MarketsPage'
import { MarketDetailsPage } from '../../pages/MarketDetailsPage'
test.describe('Market Search and View Flow', () => {
test('user can search markets and view details', async ({ page }) => {
// 1. Navigate to markets page
const marketsPage = new MarketsPage(page)
await marketsPage.goto()
// Verify page loaded
await expect(page).toHaveTitle(/Markets/)
await expect(page.locator('h1')).toContainText('Markets')
// 2. Perform semantic search
await marketsPage.searchMarkets('election')
// Wait for API response
await page.waitForResponse(resp =>
resp.url().includes('/api/markets/search') && resp.status() === 200
)
// 3. Verify search results
const marketCards = marketsPage.marketCards
await expect(marketCards.first()).toBeVisible()
const resultCount = await marketCards.count()
expect(resultCount).toBeGreaterThan(0)
// Take screenshot of search results
await page.screenshot({ path: 'artifacts/search-results.png' })
// 4. Click on first result
const firstMarketTitle = await marketCards.first().textContent()
await marketCards.first().click()
// 5. Verify market details page loads
await expect(page).toHaveURL(/\/markets\/[a-z0-9-]+/)
const detailsPage = new MarketDetailsPage(page)
await expect(detailsPage.marketName).toBeVisible()
await expect(detailsPage.marketDescription).toBeVisible()
// 6. Verify chart renders
await expect(detailsPage.priceChart).toBeVisible()
// Verify market name matches
const detailsTitle = await detailsPage.marketName.textContent()
expect(detailsTitle?.toLowerCase()).toContain(
firstMarketTitle?.toLowerCase().substring(0, 20) || ''
)
// Take screenshot of market details
await page.screenshot({ path: 'artifacts/market-details.png' })
})
test('search with no results shows empty state', async ({ page }) => {
const marketsPage = new MarketsPage(page)
await marketsPage.goto()
// Search for non-existent market
await marketsPage.searchMarkets('xyznonexistentmarket123456')
// Verify empty state
await expect(page.locator('[data-testid="no-results"]')).toBeVisible()
await expect(page.locator('[data-testid="no-results"]')).toContainText(
/no.*results|no.*markets/i
)
const marketCount = await marketsPage.marketCards.count()
expect(marketCount).toBe(0)
})
test('can clear search and see all markets again', async ({ page }) => {
const marketsPage = new MarketsPage(page)
await marketsPage.goto()
// Initial market count
const initialCount = await marketsPage.marketCards.count()
// Perform search
await marketsPage.searchMarkets('trump')
await page.waitForLoadState('networkidle')
// Verify filtered results
const filteredCount = await marketsPage.marketCards.count()
expect(filteredCount).toBeLessThan(initialCount)
// Clear search
await marketsPage.searchInput.clear()
await page.waitForLoadState('networkidle')
// Verify all markets shown again
const finalCount = await marketsPage.marketCards.count()
expect(finalCount).toBe(initialCount)
})
})
# Run the generated test
npx playwright test tests/e2e/markets/search-and-view.spec.ts
Running 3 tests using 3 workers
โ [chromium] โบ search-and-view.spec.ts:5:3 โบ user can search markets and view details (4.2s)
โ [chromium] โบ search-and-view.spec.ts:52:3 โบ search with no results shows empty state (1.8s)
โ [chromium] โบ search-and-view.spec.ts:67:3 โบ can clear search and see all markets again (2.9s)
3 passed (9.1s)
Artifacts generated:
- artifacts/search-results.png
- artifacts/market-details.png
- playwright-report/index.html
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ E2E Test Results โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Status: โ
ALL TESTS PASSED โ
โ Total: 3 tests โ
โ Passed: 3 (100%) โ
โ Failed: 0 โ
โ Flaky: 0 โ
โ Duration: 9.1s โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Artifacts:
๐ธ Screenshots: 2 files
๐น Videos: 0 files (only on failure)
๐ Traces: 0 files (only on failure)
๐ HTML Report: playwright-report/index.html
View report: npx playwright show-report
โ E2E test suite ready for CI/CD integration!
## Test Artifacts
When tests run, the following artifacts are captured:
**On All Tests:**
- HTML Report with timeline and results
- JUnit XML for CI integration
**On Failure Only:**
- Screenshot of the failing state
- Video recording of the test
- Trace file for debugging (step-by-step replay)
- Network logs
- Console logs
## Viewing Artifacts
```bash
# View HTML report in browser
npx playwright show-report
# View specific trace file
npx playwright show-trace artifacts/trace-abc123.zip
# Screenshots are saved in artifacts/ directory
open artifacts/search-results.png
If a test fails intermittently:
โ ๏ธ FLAKY TEST DETECTED: tests/e2e/markets/trade.spec.ts
Test passed 7/10 runs (70% pass rate)
Common failure:
"Timeout waiting for element '[data-testid="confirm-btn"]'"
Recommended fixes:
1. Add explicit wait: await page.waitForSelector('[data-testid="confirm-btn"]')
2. Increase timeout: { timeout: 10000 }
3. Check for race conditions in component
4. Verify element is not hidden by animation
Quarantine recommendation: Mark as test.fixme() until fixed
Tests run on multiple browsers by default:
Configure in playwright.config.ts to adjust browsers.
Add to your CI pipeline:
# .github/workflows/e2e.yml
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run E2E tests
run: npx playwright test
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report/
For PMX, prioritize these E2E tests:
๐ด CRITICAL (Must Always Pass):
๐ก IMPORTANT:
DO:
DON'T:
CRITICAL for PMX:
test.skip(process.env.NODE_ENV === 'production') for financial tests$plan to identify critical journeys to test$tdd for unit tests (faster, more granular)$e2e for integration and user journey tests$code-review to verify test qualityThis command invokes the e2e-runner agent located at:
~/.codex/agents/e2e-runner.md (if present)
# Run all E2E tests
npx playwright test
# Run specific test file
npx playwright test tests/e2e/markets/search.spec.ts
# Run in headed mode (see browser)
npx playwright test --headed
# Debug test
npx playwright test --debug
# Generate test code
npx playwright codegen http:/$localhost:3000
# View report
npx playwright show-report