Home

Awesome

@bahmutov/cypress-examples cypress-examples

ci status prettier status deployed status scrape renovate-app badge cypress version

Static site with Cypress examples tested right from the Markdown sources

Live site glebbahmutov.com/cypress-examples/

Benefits

Blog posts

The following blog posts explain how I write Cypress demo tests using Markdown in this repository

You can see the cypress.config.js and plugins.js to learn how cypress-markdown-preprocessor is set tup.

Notes

Try published specs

You can run the exported spec files.

$ npm i -D @bahmutov/cypress-examples
$ npx cypress open --project node_modules/\@bahmutov/cypress-examples/

Spec running

Development

There is a difference between running Markdown files and testing fully exported specs against the built site. To do this all in a single command locally run

npm run dev:export

This command builds the static site, exports the Markdown specs into JavaScript specs, starts local server, and when it responds, starts Cypress.

You can also export all Markdown files into JavaScript, run them locally, and run all E2E tests using the JS specs with:

npm run run:exported