🧪 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
- 1Locate elements by accessible role/name — resilient AND forces a11y
- 2Ban generated class names and nth-child position selectors
- 3Model flows in helpers once; tests read as user intent scripts
- 4Assert observable outcomes (row appears) over DOM internals
- 5Seed state via APIs/fixtures, never UI-only setup chains
- 6Keep each spec independent: any subset passes on fresh context
- 7Avoid conditional control-flow; command determinism wins
- 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-cypressInstall globally
$ npx skills add aniruddhaadak80/skills --skill automation-e2e-maintainable-selectors-cypress -gTags
#e2e#maintainability#qa-testing#automation