chronograf/ui/cypress
k3yi0 011b6d7bdb chore(cypress): format code 2022-07-15 10:28:25 +02:00
..
fixtures chore(cypress): adjust source fixture 2022-07-12 10:39:55 +02:00
integration chore(cypress): format code 2022-07-15 10:28:25 +02:00
plugins chore(cypress): add clickAttached function 2022-06-20 08:41:13 +02:00
snapshots/explorerSchemaBrowser.test.ts Cypress tests and e2e github action flow (#5896) 2022-03-25 09:27:29 +01:00
support test(cypress): add test Chronograf/Admin/Org Mappings page (#5972) 2022-07-04 07:43:06 +02:00
README.md chore: improve readme 2022-06-13 12:21:49 +02:00
index.d.ts test(cypress): add test Chronograf/Admin/Org Mappings page (#5972) 2022-07-04 07:43:06 +02:00
local-chronograf-influxdb-enterprise.sh fix(ci): make test InfluxDB enterprise meta service accessible 2022-05-06 10:31:09 +02:00
tsconfig.json chore(cypress): add cypress real events plugin 2022-06-20 08:39:18 +02:00

README.md

Cypress tests

How to run the tests

You have to first start a mock OAuth2 server, Chronograf, and InfluxDB Enterprise before the tests can be run.

OAuth2 Mock server

yarn test:e2e:oauth-mock

The default configuration of the OAuth2 server is explained in ../../etc/oauth2-server-mock/env.sh

Chronograf

Chronograf must be configured with authentication against the OAuth2 mock server:

cd ../..
./etc/oauth2-server-mock/oauth-for-chronograf.sh 
# build chronograf from sources 
make
# start it (herein with a custom file-based database for e2e tests)
./chronograf -b chronograf-e2e.db

InfluxDB Enteprise

InfluxDB Enterprise is required by the tests. InfluxDB installation is automated with kind and helm. Setup InfluxDB license key and start it with:

export INFLUXDB_ENTERPRISE_LICENSE_KEY=yourlicensekey
./local-chronograf-influxdb-enterprise.sh

... and wait, it takes a while

Cypress tests

Run Cypress e2e tests in a headless mode using:

yarn test:e2e

or within a browser (Chrome) using:

yarn test:e2e:headed