About this project

This repository provides a comprehensive set of example projects demonstrating how to test common scenarios with Cypress. It is organized as a monorepo where each example has its own Cypress configuration, tests, and assets, while sharing a single root Cypress installation. The recipes are grouped into several categories: - Fundamentals: environment variables, dynamic tests from JSON/CSV/API, fixtures, custom commands, TypeScript setup, timeouts, and Cypress events. - Testing the DOM: tab handling, hover and hidden elements, form interactions, drag and drop, waiting for resources, CSV table validation, performance metrics, select widgets, Shadow DOM, file downloads, pagination, clipboard, and responsive images. - Logging in: Basic Auth, Single Sign-On, HTML and XHR web forms, CSRF tokens, JWT, and using application code. - Preprocessors: grep filtering, TypeScript with Browserify or Webpack, and Flow with Browserify. - Blogs: recipes derived from Cypress blog posts, including application actions, E2E API testing, snapshots, element coverage, Redux and Vue/Vuex testing, accessibility testing, iframes, and form submission. - Stubbing and spying: network stubbing with cy.intercept, stubbing functions, window.fetch, window.open, console methods, Google Analytics, resource loading, and navigator properties. - Unit Testing: importing and testing application code. - Server Communication: bootstrapping apps, seeding databases, XHR assertions, visiting multiple domains, passing values between specs, offline testing, server timing, waiting for APIs, and making HTTP requests. Additional resources include links to official Cypress guides for visual testing and code coverage, community recipes for visual regression, Cucumber, Jest, email testing, and OAuth popup authorization. Installation is straightforward with npm install from the root, and examples can be run via the Cypress GUI or headlessly from the CLI.