This repository contains code for the Cover Your Basics end-to-end tests.
To configure the testing environment, run the following command:
$ ./scripts/configure
This will download Selenium and ChromeDriver if they are not installed. Once these files are downloaded, you must set the following environment variables:
MINOS_ENVIRONMENT
: One of the keys in theconfig/environments.json
fileMINOS_GOOGLE_API_CREDENTIALS
: The absolute path to the API credentials JSON file
The credentials for the Gmail API can be downloaded from the Google APIs dashboard. Once you have downloaded this file and set its path via the environment variable, you must grant the Gmail API access to your account by running the following:
$ npm run authorize-gmail
# Start Selenium in the foreground
$ npm run selenium
# Run the main tests in another session
$ npm run test
# Run a specific test file
$ ./scripts/test --spec=tests/files/sitemap.js
# Run the main tests in a browser with a GUI
$ npm run test:gui
# Test the email workflow
$ npm run test:email
# Use a custom environment for a single run of tests
$ MINOS_ENVIRONMENT=staging npm run test
# Lint code
$ npm run lint
# Profile the performance of an environment
$ MINOS_ENVIRONMENT=production npm run profile
# Run an SSL Labs scan on an environment
$ MINOS_ENVIRONMENT=staging npm run profile:ssl