Test Your Drupal Site The Easy Way: Use Cypress
summary
Cypress replaces a brittle Behat+Selenium setup with a fast, retryable JavaScript E2E workflow for Drupal sites, using a single dependency, a Docker image for CI, and plugins. Examples include a log in custom command with session caching to speed runs, intercept to stub and wait for AJAX and JSON:API, and a GitHub Actions recipe that tags and parallelizes tests with Cypress Split. Caveats: limited iframe and multi‑tab support and JavaScript/TypeScript only; Lighthouse and axe plugins run audits.
AI-written summary · about
chapters (14)
- 0:00Introduction and speaker intro
- 1:09Why test and testing pyramid
- 5:31Drupal background and testing approaches
- 11:01Behat struggles vs Cypress benefits
- 16:46Cypress features and philosophy
- 20:10Custom commands and authentication
- 23:56Best practices for element selection
- 26:51Aliases and lifecycle hooks
- 28:21Intercepting API requests
- 31:39Organizing and structuring tests
- 34:51Good vs bad test examples
- 40:19Cypress plugins and downsides
- 43:38Demo of Cypress test runner
- 56:23Q&A and closing
