Lyquix / lyquix-tests

Base Cypress tests for Lyquix sites... just add water

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lyquix Cypress Tests

Base setup to get started with cypress end-to-end website testing.

Installation

  1. Download this repo and extract it within your project, in its own folder, for example /tests

  2. Install dependencies with npm install

  3. In package.json update:

  • Under scripts update set PERCY_TOKEN=mytoken with the token from percy.io for the project
  • Under percy update the value of the "Authorization" header. If you are using HTTP Basic Authorization you can use https://www.blitter.se/utils/basic-authentication-header-generator/ to generate a Base64 encoded string of the username and password. If not, remove the "Authorization" key.
  1. In cypress/fixtures/options.json:
  • Update "baseUrl"
  • Enter the list of URLs to test in "testUrls"
  • If using HTTP Basic Auth, enter the username and password in "httpUser" and "httpPassword"

Executing Tests

To open Cypress UI:

npm run cypress:open

To run all tests on headless Cypress

npm run cypress:run

To generate HTML reports of the all tests

npm run cypress:report

To run visual tests (all specs that match cypress/integrations/visual*)and take snapshots with Percy.io

npm run cypress:visual

About

Base Cypress tests for Lyquix sites... just add water


Languages

Language:JavaScript 95.2%Language:Shell 4.8%