- โ๏ธ Install the node version listed in
.nvmrc
(we recommend using nvm). - ๐ธ Install yarn (with
npm i -g yarn
) - ๐งถ Install the project's dependencies (with just
yarn
) - ๐ฒ Run Cypress (with
yarn test:cy
) - ๐ Write tests
-
We almost exclusively use
cypress-testing-library
to write our assertions. You're welcome to use them or not. -
At Air, we try to avoid to duplicate coverage; however, we can't provide you the function we use to forcibly authenticate and avoid the login or registration process for inner-app tests. Unfortunately, that means you'll want to login or register before you can make in-app assertions.
-
We use real data in our integration tests, but you're welcome to use fixtures if that's what you're used to!
After finishing the steps from "Getting Started", you could run the tests by the following steps:
- Open a terminal and ensure the current directory is the root of this project.
- Open Cypress by entering
yarn test:cy
on the command line. - On the upper right corner of the new window, select the desired browser (Chrome, Firefox or Electron) from the dropdown menu.
- Click one of the file name from the list to launch a test.
Please see Bugs for a list of known bugs discovered during the exercise.