graphql-engine/console/cypress
Rishichandra Wawhal 1d1de94303 better key persistence in console (#2686)
* change login flow to handle admin secret persistence

* handle headers init state

* add tooltip for remember-me

* remove log, make label clickable

* fix a closure scope bug

* handle login verification at route level

* update Login.js

* refactor

* remove extra file

* refactor

* add id to tooltips

* remove adminsecretlabel + update admin secret storage flow

* fix heartIcon close handling

* .

* fix admin secret setting

* fix urlPrefix

* add admin secret header if not present

* update jwt analyzer icon

* persist if admin secret header has already been added

* set cli console mode as constant

* handle CLI admin secret errors

* make separate logout page

* fix typos

* fix typos

* fix typos

* fix typos

* fix cli error

* fix login page path
2019-09-25 21:16:28 +05:30
..
fixtures add console to graphql-engine 2018-06-28 10:27:37 +05:30
helpers better key persistence in console (#2686) 2019-09-25 21:16:28 +05:30
integration make destructive actions on console require typed out confirmation (close #1469) (#2400) 2019-09-10 20:32:04 +05:30
plugins console: more tests (#35) 2018-07-04 18:27:56 +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 metadata button appears for custom versions (fixe #618) (#662) 2018-10-09 14:05:44 +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-table > test.js