-
Notifications
You must be signed in to change notification settings - Fork 0
e2e
This boilerplate uses Nightwatch.js for e2e tests. Nightwatch.js is a highly integrated e2e test runner built on top of Selenium. This boilerplate comes with Selenium server and chromedriver binaries pre-configured for you, so you don't have to mess with these yourself.
Let's take a look at the files in the test/e2e
directory:
-
runner.js
A Node.js script that starts the dev server, and then launches Nightwatch to run tests against it. This is the script that will run when you run
npm run e2e
. -
nightwatch.conf.js
Nightwatch configuration file. See Nightwatch's docs on configuration for more details.
-
custom-assertions/
Custom assertions that can be used in Nightwatch tests. See Nightwatch's docs on writing custom assertions for more details.
-
specs/
You actual tests! See Nightwatch's docs on writing tests and API reference for more details.
To configure which browsers to run the tests in, add an entry under "test_settings" in test/e2e/nightwatch.conf.js
, and also the --env
flag in test/e2e/runner.js
. If you wish to configure remote testing on services like SauceLabs, you can either make the Nightwatch config conditional based on environment variables, or use a separate config file altogether. Consult Nightwatch's docs on Selenium for more details.
Created by by Max Hill