.agents/commands/comet/generate-e2e-test.md
Generate a comprehensive Playwright E2E test for an Opik feature using the three-agent workflow: Plan -> Generate -> Heal.
http://localhost:5173)playwright-test MCP server must be connectedcd tests_end_to_end/typescript-tests && npm install && npx playwright install chromiumBefore doing anything else, check ~/.opik.config and ensure it points to localhost. The Python Opik SDK (used by the Flask test helper service) reads this file, and if it points to a cloud environment, the agent will accidentally create real data there.
Run this command to check:
cat ~/.opik.config
If url_override points to anything other than http://localhost:5173/api, back up the config and set it to local:
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 test generation workflow is complete, remind the user to restore their original config:
cp ~/.opik.config.bak ~/.opik.config
If ~/.opik.config already points to localhost, skip this step.
A thorough plain-English description is the best input. Be specific about:
Good examples:
Optional extra context you can provide:
The agent will always explore the live UI regardless of what extra context you provide — the description just helps it know where to focus.
Read the skill definition at skills/playwright-e2e/SKILL.md and follow it exactly.
The skill contains:
playwright-test MCP server tools that MUST be usedYou MUST use the playwright-test MCP tools (planner_setup_page, generator_setup_page, playwright_test_run_test, playwright_test_debug_test, etc.) to interact with the running Opik application. Do NOT just read code files — the agents are designed to explore the live UI via a real browser.
~/.opik.config points to localhost (see Safety section above)skills/playwright-e2e/SKILL.md and all linked knowledge base documentsskills/playwright-e2e/agents/playwright-test-planner.md) and planner_setup_page MCP toolskills/playwright-e2e/agents/playwright-test-generator.md) and generator_setup_page MCP toolskills/playwright-e2e/agents/playwright-test-healer.md) and playwright_test_run_test / playwright_test_debug_test MCP toolstest.fixme() tests, suggest additional scenarios~/.opik.config if it was modifiedtest-conventions.mdtest.fixme() with explanation)playwright-test MCP server is not connected, STOP and tell the user to connect it before proceedingwebServer configdata-testid attributes are needed for reliable locators, add them to the React components in apps/opik-frontend/src/End Command