Testing
Follow the steps below to setup and run the test specifications using Cypress. We recommend setting up ToolJet locally before proceeding.
Setting up
- Navigate to the
cypress-tests
directory and enter the following command:npm install
Running Tests
Headed mode
-
To run cypress in headed mode, run the following command:
npm run cy:open
-
In headed mode, the user will be able to choose the test specs from the test runner:
Headless mode
-
To run cypress in headless mode, run the following command:
npm run cy:run
-
To run a specific spec in headless mode, run the following command:
npm run cy:run -- --spec "cypress/e2e/dashboard/multi-workspace/manageSSO.cy.js
cautionIf some test specs need the environment variables, the user can pass them similar to the following command:
npm run cy:open -- --env='{"pg_host":"localhost","pg_user":"postgres", "pg_password":"postgres"}'
or the user can add env-vars in the cypress.config.js file
info
Check all the Cypress commands here