πŸ›‘οΈTesting

Getting tests to work

Run mix test to run the tests.

Petal Pro also comes with some end-to-end (E2E) tests (see signup_test.exs). We use the library Wallaby for this.

Wallaby tests don't run by default as they can be slow. We have hidden them behind a "feature" flag.

For E2E tests to work, you must install Chromedriver, which will run the tests like you were clicking things in a browser. On a Mac, you can install it with:

Then to run the E2E tests run mix test --only feature. Or you could use our alias mix wallaby (see aliases defined in mix.exs).

On Mac, you may get the error:

Error: β€œchromedriver” cannot be opened because the developer cannot be verified. Unable to launch the chrome browser

If this happens, you can run this command: