Frontend testing

From Dadmin88/hermes-profile-packs · View interactive version

Frontend testing is an AI agent skill from the GitHub repository Dadmin88/hermes-profile-packs. Build frontend tests that prove user-observable behavior, interaction states, accessibility, and integration contracts at the smallest reliable layer.

How to use this skill

Skill file

Frontend Testing

Use when implementing or changing user-facing behavior and the frontend needs executable evidence that the interaction still works.

Procedure

  1. Read the project's test conventions and establish the relevant baseline before adding tests so existing failures are not mistaken for regressions.
  2. List the behaviors at risk: rendering states, user input, validation, keyboard interaction, focus changes, navigation, permissions, async loading, API responses, optimistic updates, responsive behavior, and recovery from errors.
  3. Choose the smallest layer that proves each behavior:
  1. Exercise the interface the way a user does. Prefer accessible roles, labels, names, visible text, and stable public test hooks over CSS classes, component internals, DOM depth, or implementation-specific selectors.
  2. Mock at meaningful boundaries. Stub network behavior when the test is about UI handling, but do not mock away the exact integration or browser behavior the test is supposed to prove.
  3. Include important non-happy paths: loading, empty data, invalid input, unauthorized/forbidden responses, slow requests, request failure, retries, rapid repeated actions, cancellation, and stale/out-of-order responses where relevant.
  4. Include accessibility assertions where automation can catch real regressions, and manually or browser-test keyboard/focus behavior for critical custom interactions. Automated accessibility checks do not replace an independent accessibility review.
  5. Keep tests deterministic. Control time, randomness, network, viewport, locale, and persisted state when they would otherwise create flakiness.
  6. Add a regression test for reproduced bugs whenever the failure can be captured reliably.
  7. Run focused tests during implementation, then the broader relevant suite and a real rendered-flow check before completion. Record exact validation and any remaining manual-risk area.

Decision rules

Quality gate

Testing is sufficient when the changed user-visible behavior and material failure states are proven at appropriate layers, selectors and fixtures are stable, the relevant suite passes, and the critical flow has been validated in a real rendered environment.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.