This uses nightwatch-cucumber. You should also familiarize yourself with the nigtwatch API and guide.
To run the tests:
- Install the required modules:
npm i
- Run the tests in Chrome and Firefox:
npm test
If you want to test individual browsers:
npm run test-chrome
or
npm run test-firefox
The tests use environment variables in order to know what Portal and environment to test. These are as follow:
-
O2_ENV
- Set this todev
if you want to test stage Lowlander Portal. Any other value will assume you want production. -
O2_AUTH_EMAIL
- Set this to the email address you want to use for login to the set Portal. -
O2_AUTH_PASSWORD
- Set this to the password you want to use for login to the set Portal.
An example of this would be:
O2_ENV=dev O2_AUTH_EMAIL='j.doe@example.com' O2_AUTH_PASSWORD='53cr37!' npm test
When going to a URL in your step definitions (steps.js
), make sure you use the full URL with the protocol. For instance:
client.url('http://portal.example.com');
When registering a handler (see libs/handlers.js
), make sure that you call the final callback()
. If you don't,
your tests will hang waiting for this.
Adeola Awoyemi adeola.awoyemi@teamaol.com