chronograf/ui/cypress
k3yi0 3d5e0d6670 chore(ui): adjust attribute value, adjust test 2022-06-21 14:09:42 +02:00
..
fixtures chore(cypress): add chronograf fixture file 2022-06-20 09:03:11 +02:00
integration chore(ui): adjust attribute value, adjust test 2022-06-21 14:09:42 +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 chore(cypress): remove import 2022-06-20 11:40:38 +02:00
README.md chore: improve readme 2022-06-13 12:21:49 +02:00
index.d.ts chore(cypress): add clickAttached function 2022-06-20 08:41:13 +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