# Debugging Workflow (Humand E2E) Use a layered debugging flow before changing test code. ## Step-by-step 1. Reproduce the failure in focused scope 2. Inspect stack trace and failing step 3. Validate current UI state with Playwright MCP snapshots 4. Check console and network events 5. Apply fix at the correct layer (POM first) 6. Rerun focused file, then module ## Useful commands ```bash npm --prefix e2e run setup:auth PLAYWRIGHT_BROWSERS_PATH=0 playwright test tests/goals/cycle-wizard.spec.ts --headed PLAYWRIGHT_BROWSERS_PATH=0 playwright test tests/goals/cycle-wizard.spec.ts --debug PLAYWRIGHT_BROWSERS_PATH=0 playwright show-report ``` ## What to inspect first - route and URL expectations - translated labels (English) - dialogs/tabs visibility state - API failures (`401`, `403`, `500`) - auth storage state freshness - whether the failing selector belongs inside a drawer or other scoped region ## Fix strategy - update locators and POM actions before touching many tests - keep fixes minimal and behavior-driven - if feature is broken, use `test.fixme()` with explicit reason and issue link/context