con un clic
playwright-e2e
// Playwright E2E test generation workflow for Opik. Use when generating, fixing, or planning automated tests in tests_end_to_end/.
// Playwright E2E test generation workflow for Opik. Use when generating, fixing, or planning automated tests in tests_end_to_end/.
Java backend patterns for Opik. Use when working in apps/opik-backend, designing APIs, database operations, or services.
Python SDK patterns for Opik. Use when working in sdks/python, on SDK APIs, integrations, or message processing.
Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, task plans, or architectural explanations.
Add analytics events to Opik features. Use when wiring PostHog events on the frontend or backend for product analytics tracking.
Authoring Fern MDX documentation pages for the Opik docs site, plus release-note and changelog routing. Use when writing or updating pages under apps/opik-documentation/documentation/fern/, drafting PR descriptions, or picking the right changelog surface.
React frontend patterns for Opik. Use when working in apps/opik-frontend, on components, state, or data fetching.
| name | playwright-e2e |
| description | Playwright E2E test generation workflow for Opik. Use when generating, fixing, or planning automated tests in tests_end_to_end/. |
Three-agent workflow for generating end-to-end tests for the Opik application:
Use when developer requests E2E test generation or repair:
# Opik must be running locally
# Frontend at http://localhost:5173
# Backend healthy
# Playwright environment
cd tests_end_to_end/typescript-tests
npm install
npx playwright install chromium
Before running any tests or SDK operations, check ~/.opik.config. The Python Opik SDK (used by the Flask test helper service) reads this file. If it points to a cloud environment, the workflow will accidentally create real data there.
cat ~/.opik.config
If url_override points to anything other than http://localhost:5173/api, back up and fix it:
cp ~/.opik.config ~/.opik.config.bak 2>/dev/null || true
cat > ~/.opik.config << 'EOF'
[opik]
url_override = http://localhost:5173/api
workspace = default
EOF
After the workflow is complete, remind the user to restore their config: cp ~/.opik.config.bak ~/.opik.config
These context files provide the domain knowledge agents need to produce accurate tests:
Agent: agents/playwright-test-planner.md
Input: Running Opik app + feature description
Output: tests_end_to_end/typescript-tests/specs/{feature-name}.md
Uses seed test: tests/seed-for-planner.spec.ts
Agent: agents/playwright-test-generator.md
Input: Markdown test plan from specs/
Output: tests_end_to_end/typescript-tests/tests/{feature-area}/{test-name}.spec.ts
Uses existing fixtures and page objects. References test-conventions.md for all coding standards.
Agent: agents/playwright-test-healer.md
Input: Failing test + error info
Output: Passing test or test.fixme() if the feature is genuinely broken
tests_end_to_end/
├── test-helper-service/ # Flask service bridging TS tests to Python SDK
├── test_files/ # Test attachments (images, audio, PDFs)
├── installer_utils/ # Shell scripts for environment checks
└── typescript-tests/
├── specs/ # Markdown test plans (planner output)
├── tests/ # Executable tests (generator output)
│ ├── projects/
│ ├── datasets/
│ ├── experiments/
│ ├── prompts/
│ ├── tracing/
│ ├── feedback-scores/
│ ├── playground/
│ ├── online-scoring/
│ └── seed-for-planner.spec.ts
├── fixtures/ # Test fixtures (base -> feature-specific)
├── page-objects/ # Page Object Model classes
├── helpers/ # TestHelperClient, random, wait utilities
├── config/ # Environment configuration
└── playwright.config.ts # Playwright configuration