⚡AgentSkills
🧪 QA & Testing · Test Automation

Write E2E tests that survive redesigns (Cypress)

Selector strategy and structure choices keeping end-to-end suites maintainable through UI churn.

intermediate~35 minQA EngineersSDETsTest Automation Engineers

Steps

  1. 1Locate elements by accessible role/name — resilient AND forces a11y
  2. 2Ban generated class names and nth-child position selectors
  3. 3Model flows in helpers once; tests read as user intent scripts
  4. 4Assert observable outcomes (row appears) over DOM internals
  5. 5Seed state via APIs/fixtures, never UI-only setup chains
  6. 6Keep each spec independent: any subset passes on fresh context
  7. 7Avoid conditional control-flow; command determinism wins
  8. 8Intercept network for deterministic state setup

Common Pitfalls

  • ▲Page objects becoming second app full of logic
  • ▲Chained UI setups breaking one hop upstream

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill automation-e2e-maintainable-selectors-cypress
Install globally
$ npx skills add aniruddhaadak80/skills --skill automation-e2e-maintainable-selectors-cypress -g

Tags

#e2e#maintainability#qa-testing#automation

Related skills

Quarantine, root-cause classes, and stabilization patterns restoring CI trustworthiness.

🧪 QA & Testing·~40m

Selector strategy and structure choices keeping end-to-end suites maintainable through UI churn.

🧪 QA & Testing·~35m