https://github.com/wlsf82/testes-e2e-com-cypress-tat
https://github.com/wlsf82/testes-e2e-com-cypress-tat
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wlsf82/testes-e2e-com-cypress-tat
- Owner: wlsf82
- Created: 2021-08-21T16:35:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T19:49:56.000Z (over 2 years ago)
- Last Synced: 2025-04-23T08:13:59.084Z (6 months ago)
- Language: JavaScript
- Size: 86.9 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testes _end-to-end_ com Cypress
Sample project to demonstrate end-to-end (e2e) tests written with Cypress running on a CI service.
## Pre-requirements
To run this project, you will need:
- [git](https://git-scm.com/downloads) (I've used version `2.26.2` while writing this doc)
- [nodejs](https://nodejs.org/en/) (I've used version `14.17.3` while writing this doc)
- NPM (I've used version `6.14.13` while writing this doc)
- [Google Chrome](https://www.google.com/intl/en_us/chrome/) (I've used version `92.0.4515.131` while writing this doc)**Note:** When installing nodejs, NPM is automatically installed too.
## 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:** `cypress.env.json` file is not tracked by git.
## Running the tests
In this project, you can run tests in interactive and headless modes, and 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 Test Runner to run tests in interactive mode using a desktop viewport.
Run `npm run cy:open:tablet` to open the Cypress Test Runner to run tests in interactive mode using a tablet viewport.
## Support this project
If you want to support this project, leave a ⭐.
___
Made with ❤️ by [Walmyr](https://walmyr.dev).