hivemq/hivemq-edge/debug-cypress
Claude Code and agent skill by hivemq/hivemq-edge
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when a Cypress test is failing and the cause is not immediately obvious. Invoke automatically when: a test throws "element not found", "expected to find element", "element is disabled", or any assertion failure. Also invoke before reaching for {force: true}, cy.wait(), or rewriting a test from scratch — investigate first.
Install
npx vskill@latest install hivemq/hivemq-edge/debug-cypressSKILL.md
Debug Cypress
Systematic investigation protocol for Cypress test failures.
Rule: if you cannot answer "where in the code is this defined?" — stop guessing and find it.
When to invoke
Invoke this skill when:
- A Cypress test fails with "element not found", "expected element", or any assertion failure
- A test passes locally but fails in CI
- You are about to use
{force: true},cy.wait(500), or rewrite a test - You are about to make an assumption about a selector, label, or text value
Investigation protocol — follow in order, do not skip steps
Step 1 — Read the exact error
Copy the full error message. Note:
- The exact selector or text it was looking for
- The line number that failed
- Any "found N elements, expected 1" details
Do not guess from a partial error.
Step 2 — Find the implementation
Locate where the element is defined in source:
Read the found file. Do not assume — look at the actual JSX.
Step 3 — Resolve translations (if using t())
If the component uses aria-label={t('some.key', { context: value })}:
Translation files:
- Main app:
src/locales/en/ - DataHub:
src/extensions/datahub/locales/en/datahub.json
Step 4 — Check how other tests use the same element
If other tests already select this element correctly, match their approach exactly.
Step 5 — Check the Page Object Model
Page objects live in cypress/pages/{Module}/{ModulePage}.ts.
If the element exists but has no POM getter: add one. Never use raw selectors in test bodies.
Step 6 — Fix and verify
- Update the POM getter if needed
- Update the test to use the POM getter
- Run the specific test once to verify:
Quick command reference
What good investigation looks like
Error: Expected to find element: [aria-label="Function"]
- Search source:
grep -r "aria-label.*Function" src --include="*.tsx" - Find:
aria-label={t('workspace.nodes.type', { context: nodeType })} - Resolve key:
workspace.nodes.type_FUNCTION→ value:"JS Function" - Fix POM: use
"JS Function"not"Function" - Run test once — passes
Total time: 3–5 minutes.
Execution and artifacts
Running tests
Never prepend `rm -rf cypress/videos` — rm is not in the allowed commands list. Cypress overwrites videos automatically.
CLI output — what you get
The CLI output contains the full error with the exact selector and line number:
This is enough to start Step 2 (find the implementation). You do not need screenshots.
DOM state snapshot
If you need to see what elements are actually on the page, add cy.logDOMState() before the failing assertion. It writes a JSON file to cypress/html-snapshots/ with all IDs, data-testid values, and ARIA roles visible at that moment:
This is more useful than a screenshot: you get a machine-readable list of every selector available on the page.
Accessibility violation details in CI
If cy.checkAccessibility() fails but the log shows no violation details, check cypress.config.ts:
And cypress/support/e2e.ts:
Without cy:log in collectTypes, axe violation details are swallowed.
Never do this
- Add
{force: true}to click a covered element — find the correct element instead - Add
cy.wait(500)— usecy.should()assertions to wait for state - Assume the selector is correct and the app is broken
- Rewrite the test before understanding why it fails
- Use
npx cypress run— usepnpm cypress:run:e2einstead
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinghivemq-edge-frontend/.claude/skills/debug-cypress/SKILL.md
Popularity
- Repository stars
- 164
- Repository forks
- 44
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hivemq/hivemq-edge/debug-cypress)