Frontend
Frontend testing
Making Mage invincible so that nothing can break it, not even itself.
Prerequisites
- It is not recommended to run tests on your working project, since failed tests can leave behind empty pipelines, triggers, etc. Set up your development environment.
- Make sure user authentication is enabled.
- Make sure your development server is running.
Configuration
- Tests default to “fail” if a client error occurs. Add the following to the top of the test file to disable this check.
- Certain setting features are enabled by default. Refer to
base.ts
for more information, and use the following snippet when needed.
Running the tests
You have the option to just run one specific test or all tests at once. There are several ways to run specific tests.
You can run the frontend tests using the CI/CD Playwright configuration with the following command:
Creating a test
Refer to the Playwright docs for examples on writing frontend tests.
Debugging
The easiest way to debug is to run tests in UI mode so you can see what went wrong.
If you are running into issues with the app and would like to report it, you can tell us about it either on GitHub or Slack.