A repo for myself to learn E2E testing with Selenium.
This installs necessary JS dependencies in the local directory.
You need a Chrome driver to run tests. On macOS, you can install it globally with brew install --cask chromedriver
.
Read more in the Selenium documentation.
Runs tests
Runs tests and watches them, i. e. listens for file changes, that trigger the tests.
This runs the tests that match the filename. For example, npm run test:match "src/4.1-explicit-wait.test.js"
Note that some tests take a long time. This is because the page calls a terribly slow API while the test is waiting for a result. This can be improved by mocking the API, but I didn't bother doing that, as it is out of scope for what I wanted achieve with this project.