Skip to content

tiagodread/cypress-challenge

Repository files navigation

cypress-challenge

CI cypress-challenge

This repository contains cypress tests and applies many approaches:

  • It uses github actions to run all tests
  • cypress dashboard is integrated
  • custom plugin to fetch auth device link from email and authorize the device (if needed)
  • uses ansible-vault to decrypt gmail api credentials
  • and more

Cypress dashboard link with test results

Install

Pre requisites

  • NodeJS
  • NPM
  • Python
  1. Clone this respository:
$ git clone https://github.com/tiagodread/cypress-challenge.git
  1. Go to the main folder:
$ cd cypress-challenge
  1. Install npm and python dependencies:
$ npm install
$ pip install -r requirements.txt
  1. Decrypt credentials.json and gmail_token.json, you'll need the vault password in order to be able to decrypt the files:
$ ansible-vault decrypt cypress/plugins/credentials.json

$ ansible-vault decrypt cypress/plugins/gmail_token.json
  1. Export the environment variables using correct values:
export CYPRESS_BASE_URL='https://environment-host' # cypress base url under test (local, stage, production)
export CYPRESS_USER_EMAIL='[email protected]' # cypress test user email
export CYPRESS_USER_PASSWORD='123test' # cypress test user password

Running the tests

Gui mode:

$ npm run cy:open

Headless mode:

$ npm run cy:run

Enjoy :)

About

Cypress tests + github actions + cypress dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published