ワンクリックで
debug-test
// Debug and fix failing Playwright e2e tests with MCP-assisted diagnosis. Use when user says "playwright test failing", "fix e2e test", "debug spec", or provides a failing .spec.ts file, e2e directory, or Playwright tag.
// Debug and fix failing Playwright e2e tests with MCP-assisted diagnosis. Use when user says "playwright test failing", "fix e2e test", "debug spec", or provides a failing .spec.ts file, e2e directory, or Playwright tag.
Generate React Testing Library tests following OCP Console best practices
Audit all Claude Code skills for stale references, broken paths, and deprecated tool names
Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub.
Expert package update assistant for OpenShift Console. Update packages safely with automated testing, building, and fixing.
Automated QA verification for OpenShift Console PRs. Builds and runs the console on both main and the PR branch, captures before/after screenshots and GIFs via Playwright MCP, then posts a side-by-side comparison as a GitHub PR comment. Use when the user asks to verify a PR, QA changes, capture visual proof, or show before/after evidence.
Migrate a Cypress test file to Playwright following Console's architecture. Use when user says "migrate", "convert cypress", "port to playwright", or provides a .cy.ts or .feature file path.
| name | debug-test |
| description | Debug and fix failing Playwright e2e tests with MCP-assisted diagnosis. Use when user says "playwright test failing", "fix e2e test", "debug spec", or provides a failing .spec.ts file, e2e directory, or Playwright tag. |
| argument-hint | <path/to/file.spec.ts | directory/ | @tag> |
| 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 |
Debug and fix failing Playwright tests using MCP as the primary diagnostic tool. Works for a single spec, a directory, or a tag. Merged from openshift-ui-tests-template/debug-test.md and test-fix-cycle.md.
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..claude/migration-context.md for the Console architecture, selector mappings, and migration rules. That file is the single source of truth for how Playwright tests should be structured./debug-test e2e/tests/console/cluster-settings/upstream-modal.spec.ts/debug-test "Verify console login"/debug-test e2e/tests/helm//debug-test --project=helm--workers=N (default: 4)Examples:
/debug-test e2e/tests/console/cluster-settings/upstream-modal.spec.ts
/debug-test e2e/tests/helm/ --workers=2
/debug-test --project=topology
npx playwright test <file> --retries=0 --workers=1 --reporter=listnpx playwright test <directory> --retries=0 --workers=<N> --reporter=listnpx playwright test --project=<name> --retries=0 --workers=<N> --reporter=listnpx playwright test --project=<name>-developer --retries=0 --workers=1 --reporter=listFor each failure, use MCP to identify root cause:
For each fixable failure, in priority order:
robustClick() or waitForLoadingComplete()awaittest.skip(true, 'reason') after confirming with MCPFix in the correct layer: selectors and waits in page objects, assertions in test files. Never put locators directly in test files when a page object exists.
Run individual test after each fix to verify. If unfixable after 2 attempts: test.skip(true, 'Descriptive reason').
Debug Summary: <target>
Total tests: N
Passing: X
Fixed: Y
Skipped: Z
Fixes applied:
- <file>: <fix description>
Tests skipped:
- <file>: <reason>
If MCP tools fail with "tool not found" or "connection refused": diagnose from error messages alone. Warn: "MCP not available — selector fixes may be inaccurate without live verification." Focus on fixes that don't require live inspection (missing awaits, type errors, obvious selector typos).
If npx playwright test fails with login/connection errors on every test: this is an infrastructure issue, not a test bug. Report it to the user and suggest checking cluster access, BRIDGE_BASE_ADDRESS, and storageState files.
If npx playwright test fails with "Cannot find module": the Playwright foundation hasn't been set up yet. Tell the user to complete the infrastructure setup first.
If a test passes on re-run without any fix: it's flaky. Use MCP to identify the timing-sensitive interaction, then fix with robustClick(), waitForLoadingComplete(), or a more specific waitFor() condition. Never mask flakiness with retries.
--retries=0 during the cyclecd frontend && yarn eslint <fixed-files> after fixes