This is a prototype of doing end-to-end (e2e) tests in/on different browsers/devices with javascipt.
- NodeJS > 8.1.4: may it's working with a lower version
- Yarn: you can use NPM instead, but I used yarn
To get ready you need to run some commands. First of all install the packages:
yarn install
The next step is to update the webdriver-manager and link the browser specific drivers to the node modules bin path. To have it easy I have written some NPM/Yarn scripts:
yarn run build
Before you are able to run tests you need to start the webdriver:
./node_modules/.bin/webdriver-manager start
You can check if the webdriver is running on http://localhost:4444/wd/hub. To check if the webdriver can be used from the scripts execute the following script:
node ./tests/webdriver-check.js
That script should connect with the selenium webdriver, open a chrome browser and load a page. After that it should be closed properly.
To work with Jest as testing framework there is a test script in the tests directory. To run the tests just call
./node_modules/.bin/jest
Jest should now open a browser, load a page and do some validations on it.