The backend uses
To launch all the tests:
If you're using Docker, you can use
If you want test coverage:
It will show the coverage and will output a
If you want to test a single file:
mix test test/mobilizon/actors/actors_test.exs
If you want to test a specific test, block or line:
mix test test/mobilizon/actors/actors_test.exs:85
coveralls.html also works the same
Not done yet.
We use Cypress for End-to-end testing.
You first need to run the webserver with the
MIX_ENV=e2e mix phx.server. The same environment parameters as the
dev environment must be provided. This allows to run database operations in the sandbox and not pollute your database.
MIX_ENV=e2e mix run priv/repo/e2e.seed.exs to have some initial data inside your instance for the tests.
When inside the
js directory, you can do either
npx cypress run
npx cypress open
Cypress provided a subscription to their recording dashboard since Mobilizon is an Open-Source project. Thanks!