/invasives-e2e-demo

Demo of Cypress End-to-End Testing for Lucy / InvasivesBC

Primary LanguageJavaScript

Demo of End-to-End testing using Cypress.io

Setup of KeyCloak

Using a non-prod KeyCloak Realm, follow instructions as per this article to set up a specific KeyCloak Client using:

  • Direct Grant Flow and
  • Client Id and Secret Credentials

Alternatively, you may import the sample KeyCloak Client and customize for your application.

Note the Client ID and Client Secret (under the Credentials tab), as you'll need both for the next step,

Local Install

Clone the repo, install dependencies and run Cypress tests

git clone git@github.com:garywong-bc/invasives-e2e-demo.git && cd invasives-e2e-demo
npm install

Application Setup

Customize the credentials for your application.

  • copy sample.cypress.env.json to cypress.env.json
  • edit cypress.env.json, setting the variable values, including auth_client_id and auth_client_secret from the previous step
  • configure the baseURL for your application in the config file
npm run test:e2e