https://github.com/wlsf82/testes-e2e-com-cypress-tat-v2
Sample project to demonstrate e2e tests written with Cypress running on GitHub Actions.
https://github.com/wlsf82/testes-e2e-com-cypress-tat-v2
curso-de-cypress escola-talking-about-testing testes-e2e-com-cypress
Last synced: 6 months ago
JSON representation
Sample project to demonstrate e2e tests written with Cypress running on GitHub Actions.
- Host: GitHub
- URL: https://github.com/wlsf82/testes-e2e-com-cypress-tat-v2
- Owner: wlsf82
- License: mit
- Created: 2023-05-09T17:25:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-03T19:29:46.000Z (about 2 years ago)
- Last Synced: 2025-04-23T08:13:37.534Z (6 months ago)
- Topics: curso-de-cypress, escola-talking-about-testing, testes-e2e-com-cypress
- Language: JavaScript
- Homepage: https://github.com/wlsf82/testes-e2e-com-cypress-v2
- Size: 292 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# End-to-end Testing with Cypress
Sample project to demonstrate end-to-end (e2e) tests written with [Cypress](https://cypress.io) running on GitHub Actions.
## Pre-requirements
To clone and run this project, you will need:
- [git](https://git-scm.com/downloads) (I've used version `2.34.1` while writing this doc)
- [Node.js](https://nodejs.org/en/) (I've used version `v18.15.0` while writing this doc)
- npm (I've used version `9.5.0` while writing this doc)**Note:** When installing Node.js, npm is automatically installed. 🚀
## Installation
To install the dev dependencies, run `npm install` (or `npm i` for short.)
## Configuring the environment variables
Before running the tests, some environment variables need to be set up.
Make a copy of the [`cypress.env.example.json`](./cypress.env.example.json) file as `cypress.env.json`, and set the appropriate values for all the variables.
**Note:** The `cypress.env.json` file is not tracked by git since it's listed in the `.gitignore` file.
## Running the tests
In this project, you can run tests in interactive and headless modes, both on desktop and tablet viewports.
### Headless mode
Run `npm test` (or `npm t` for short) to run all tests in headless mode using a desktop viewport.
Run `npm run test:tablet` to run the appropriate tests in headless mode using a tablet viewport.
### Interactive mode
Run `npm run cy:open` to open the Cypress App to run tests in interactive mode using a desktop viewport.
Run `npm run cy:open:tablet` to open the Cypress App to run tests in interactive mode using a tablet viewport.
___
Made with ❤️ by [Walmyr](https://walmyr.dev).