graphql-engine/console/cypress
Rishichandra Wawhal b2abc8b2c1 console: update tests for multiple modes
* console: fix create-table tests

1. Changed "Creating table failed" -> "Create table failed"
2. Updated cypress > plugins > index.js. It must export a function

* console: fix test for insert-browse

console: added a test for checking descending sort

* console: fix migration inconsistency in hdb mode

* console: fix tests for modify-table

* console: fix permissiosn tests

* console: fixed all tests

* console: updated the test workflow

* console: disabling video recording while testing

* console: taking migrate URL from env

* console: update readme, fixed typo
2018-07-03 12:47:08 +05:30
..
fixtures add console to graphql-engine 2018-06-28 10:27:37 +05:30
helpers console: update tests for multiple modes 2018-07-03 12:47:08 +05:30
integration console: update tests for multiple modes 2018-07-03 12:47:08 +05:30
plugins console: fix migration status in hasuradb mode, ui fixes, deps update (#32) 2018-07-02 19:13:12 +05:30
support add console to graphql-engine 2018-06-28 10:27:37 +05:30
.eslintrc.json add console to graphql-engine 2018-06-28 10:27:37 +05:30
README.md console: update tests for multiple modes 2018-07-03 12:47:08 +05:30

Test

Running all tests to generate coverage

  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

Running tests individually

Tests are modularized into following modules:

  • API-Explorer
  • Data
    • Migration Mode
    • Create Table
    • Insert Browse
    • Modify Table
    • Table Relationships
    • Table and View Permissions
    • Views

To run the tests for the modules individually (say for create table),

  • Go to the cypress.json and set the env > TEST_MODE variable to ui.

    {
        "env": {
            "TEST_MODE": "ui"
        }
    }
    
  • Run the command npm run cypress and click on create-tabel > test.js