Skip to content

cypress-io/cypress-realworld-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,266 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real World Testing with Cypress

Real World Testing with Cypress is a free and open source testing curriculum built with Next.js by the team at Cypress. Start learning today at learn.cypress.io.

Real World Testing with Cypress

Prerequisites

Installation

# Clone the repository
git clone https://github.com/cypress-io/cypress-realworld-testing.git

cd cypress-realworld-testing

# Install dependencies
yarn install

# Start the Next.js dev server (http://localhost:3000)
yarn dev

To create and run a production build locally:

yarn build
yarn start

Documentation

Internal documentation for this project lives in the /docs folder and is powered by VuePress. To view it, run:

yarn docs:dev

This starts a local server and serves the docs site.

Linting

Lint the codebase with ESLint (via next lint):

yarn lint

Unit Tests

The unit tests cover the project's XState machines and related utilities. They are powered by Mocha and Chai, live in the /tests folder, and can be run with:

yarn test:unit

Cypress End-to-End Tests

The end-to-end tests live in cypress/e2e. Open the Cypress app to run them interactively:

yarn cypress:open

Run the same tests headlessly, as they would run in CI:

yarn cypress:run

To run the tests against a mobile viewport, use the mobile variants:

yarn cypress:open:mobile
yarn cypress:run:mobile

Note: The end-to-end tests run against the application, so make sure the dev server (yarn dev) is running first.

About

Code for learn.cypress.io

Resources

License

Code of conduct

Stars

86 stars

Watchers

18 watching

Forks

Contributors