| name | migrate-cypress |
| description | Migrate a Cypress test file (.cy.ts) or Gherkin feature file (.feature) to Playwright following Console's architecture. This is the ONLY skill for Cypress-to-Playwright conversion work, you can perform full migration, analysis-only (--analyze), or dry-run (--dry-run) modes. |
| when_to_use | TRIGGER on: "migrate", "convert cypress", "port to playwright", file paths ending in .cy.ts or .feature in a migration context, requests to rewrite Gherkin scenarios as Playwright specs, or explicit /migrate-cypress invocations. Also trigger when user mentions converting "old cypress tests", "remaining e2e tests", or moving test suites from Cypress to Playwright.
DO NOT trigger for: writing new Playwright tests from scratch (no Cypress source), fixing or debugging existing .spec.ts files (use debug-test instead), running test suites, editing test infrastructure (base-page.ts, fixtures, KubernetesClient), or questions about Playwright API without migration intent.
|
| model | opus |
| argument-hint | <path/to/file.cy.ts or .feature> [--analyze] [--dry-run] |
| allowed-tools | Read, Write, Edit, Bash(find *), Bash(grep *), Bash(ls *), Bash(npx tsc *), Bash(npx playwright *), Bash(git diff *), Bash(git status), mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_resize, mcp__plugin_playwright_playwright__browser_run_code_unsafe, mcp__plugin_playwright_playwright__browser_evaluate, mcp__plugin_playwright_playwright__browser_close, mcp__plugin_playwright_playwright__browser_type, mcp__plugin_playwright_playwright__browser_wait_for, mcp__plugin_playwright_playwright__browser_network_requests, AskUserQuestion |
Migrate: Cypress to Playwright
Translate Cypress E2E tests into idiomatic Playwright code following Console's layered architecture. Adapted from openshift-ui-tests-template/migrate.md.
Before Starting
- Check that
frontend/e2e/.env exists. If missing, copy frontend/e2e/.env.example to frontend/e2e/.env and tell the user to fill in their cluster values before continuing.
- Read
.claude/migration-context.md for the complete API translation tables, structural transformation rules, Console selector mappings, and migration checklist. That file is the single source of truth for all translation context.
Input
/migrate-cypress <cypress-file-or-feature> — full migration (analyze → implement → validate)
/migrate-cypress <cypress-file-or-feature> --analyze — analysis only, produce migration plan
/migrate-cypress <cypress-file-or-feature> --dry-run — generate code without writing files
Examples
/migrate-cypress frontend/packages/integration-tests/tests/cluster-settings/upstream-modal.cy.ts
/migrate-cypress upstream-modal --analyze
/migrate-cypress frontend/packages/dev-console/integration-tests/features/addFlow/ --dry-run
Output File Mapping
Migrated tests go under e2e/tests/<package>/ based on their source package:
| Source package | Playwright project | Output directory |
|---|
packages/integration-tests/tests/<area>/ | console | e2e/tests/console/<area>/ |
packages/dev-console/integration-tests/ | dev-console | e2e/tests/dev-console/ |
packages/helm-plugin/integration-tests/ | helm | e2e/tests/helm/ |
packages/knative-plugin/integration-tests/ | knative | e2e/tests/knative/ |
packages/operator-lifecycle-manager/integration-tests/ |