2018-06-28 07:57:37 +03:00
|
|
|
# Test
|
|
|
|
|
|
|
|
## Running all tests to generate coverage
|
|
|
|
|
2018-07-03 10:17:08 +03:00
|
|
|
1. Set the `TEST_MODE` field in `cypress.json` to `cli`
|
|
|
|
2. Run the command `npm run test` from the `console` directory to run all the tests.
|
|
|
|
|
|
|
|
You can also run the complete tests from the cypress electron app:
|
|
|
|
|
|
|
|
1. Set the `TEST_MODE` field in `cypress.json` to `cli`
|
|
|
|
2. Run `npm run cypress` from the `console` directory.
|
|
|
|
3. Click on `test_complete.js`
|
2018-06-28 07:57:37 +03:00
|
|
|
|
|
|
|
## Running tests individually
|
|
|
|
|
|
|
|
Tests are modularized into following modules:
|
|
|
|
|
2018-07-03 10:17:08 +03:00
|
|
|
- API-Explorer
|
|
|
|
- Data
|
|
|
|
- Migration Mode
|
|
|
|
- Create Table
|
|
|
|
- Insert Browse
|
|
|
|
- Modify Table
|
|
|
|
- Table Relationships
|
|
|
|
- Table and View Permissions
|
|
|
|
- Views
|
2018-06-28 07:57:37 +03:00
|
|
|
|
|
|
|
To run the tests for the modules individually (say for create table),
|
|
|
|
|
2018-07-03 10:17:08 +03:00
|
|
|
- Go to the `cypress.json` and set the `env > TEST_MODE` variable to `ui`.
|
2018-06-28 07:57:37 +03:00
|
|
|
|
2018-07-04 15:57:56 +03:00
|
|
|
```
|
|
|
|
{
|
|
|
|
"env": {
|
|
|
|
"TEST_MODE": "ui"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2018-06-28 07:57:37 +03:00
|
|
|
|
2018-10-05 12:55:49 +03:00
|
|
|
- Run the command `npm run cypress` and click on `create-table > test.js`
|