ToolJet/docs/versioned_docs/version-2.65.0/contributing-guide/testing.md
Aman Regu fed052a99b
[docs]: v2.65.0 (#10415)
* add date with time column

* add table component to date with time colum

* add aggregate and group by

* add docs for retry on network error

* add cookies

* add .env vars

* add docs for v2.65.0

* remove banner from v2.65.0

* update data types title

* update querying data title
2024-07-22 19:46:36 +05:30

1.5 KiB

id title
testing 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:

    Cypress headed mode

Headless mode

  • To run cypress in headless mode, run the following command:

npm run cy:run


- For running specific spec in headless mode, run for specific spec 
 ```bash
 npm run cy:run --  --spec "cypress/e2e/dashboard/multi-workspace/manageSSO.cy.js
Cypress headless mode

:::caution If 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 :::