build: clean up e2e code (#20728)

pull/20705/head
Daniel Moran 2021-02-08 17:42:59 -05:00 committed by GitHub
parent 9a0339f397
commit ef79d3da04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
146 changed files with 0 additions and 25238 deletions

View File

@ -56,25 +56,6 @@ workflows:
branches:
only: master
hourly-e2e:
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- master
jobs:
- godeps
- jsdeps
- build:
requires:
- godeps
- jsdeps
- e2e:
requires:
- build
nightly:
triggers:
- schedule:

View File

@ -1,12 +0,0 @@
{
"presets": [
[
"env",
{
"targets": {
"node": "current"
}
}
]
]
}

View File

@ -1,39 +0,0 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"__srcdir" : "readonly",
"__basedir" : "readonly",
"__wdriver" : "readonly",
"__defaultUser": "readonly",
"__config": "readonly",
"__users": "writable"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}

View File

@ -1,35 +0,0 @@
.PHONY: docker-build docker-prep docker-test docker-test-kill docker-report test clean
RUNCMD ?= cucumber-js --tags 'not @tested and not @error-collateral'
docker-build:
docker build -t e2e-tests -f scripts/Dockerfile.e2e .
docker-prep:
mkdir -p /tmp/report \
&& docker pull quay.io/influxdb/influx:nightly
docker run -d --rm --name=test-influxdb quay.io/influxdb/influx:nightly influxd --e2e-testing=true \
&& sleep 30s
docker-test: docker-build
docker run --rm --name=test-e2e -v /tmp/report:/selenium-accept-infl2/report --network=container:test-influxdb e2e-tests ${RUNCMD}
docker-report:
docker run --rm -t --name=test-e2e -v /tmp/report:/selenium-accept-infl2/report e2e-tests npm run report:html
docker-test-kill:
docker rm -f test-e2e
test: docker-test docker-report
clean:
docker rm -f test-influxdb
rm -rf /tmp/report
bonitoo-prep:
npm run influx:setup
bonitoo-docker:
./scripts/containerTests.sh
bonitoo-test: bonitoo-prep bonitoo-docker

View File

@ -1,259 +0,0 @@
## Selenium-Accept
Selenium Acceptance tests for the Influxdbv2 UI. These tests were initially intended to support nightly testing of the open source (OSS) poduct. They are currently (7. 2020) being leveraged to support synthetic testing of the cloud deployments. This leveraging has lead to some substantial changes and improvements in configuration.
**Run cycle**
*original OSS*
```bash
npm install
npm run influx:setup
npm test
node src/utils/htmlReport.js
node src/utils/junitReport.js
```
Note that the final two reporting steps can be bundled into `package.json` scripts, or can be called as a part of the `package.json` *test* script. They are shown here to show how third party components are used to generate reports.
To clean the reports and screenshots directories:
```bash
npm run clean
```
### Configuration
Tests are configured in the file `e2e.conf.json`. The configuration to be used for a test run is specified
by the property `active` in this file. This can be overridden on the commandline.
**Command Line Arguments**
The following command line arguments are detected at load time.
* `headless` - boolean. Whether to run the tests headless or not.
* `sel_docker` or `selDocker` - boolean. Added for influxdata docker tests. Chooses options needed for running tests in the influxdata docker container.
* `active_conf` or `activeConf` - string. Declare the configuration to be activated for the test run. Must match a config declared in `e2e.conf.json`.
For example to run the dataexplorer feature `headless` against the `nightly` build configuration:
```bash
npm test headless=true activeConf=nightly -- features/dataExplorer/dataExplorer.feature
```
Another example to test the signin feature using _tags_, `headless` and against the `nighty` configuration.
```bash
npm test -- headless=true activeConf=nightly -t "@feature-signin"
```
**Environment Variable Overrides**
Configuration properties can be overridden by `E2E` environment variables. The basic pattern for exporting an environment variable to be picked up for test configuration is the token `E2E` followed by an underscore, then the path to the property to be modified as defined by the configuration tree in `e2e.conf.json`. Each node in the tree is declared in uppercase and separated by an underscore.
For example, to declare the `influx_url` property in the `development` configuration export the environment variable `E2E_DEVELOPMENT_INFLUX_URL`.
e.g.
`export E2E_DEVELOPMENT_INFLUX_URL="http://172.17.0.2:8086"`
This feature was added specifically to define passwords and usernames only via the test environment. However, it can be used with any configuration key value such as the INFLUX_URL endpoint.
e.g.
```bash
export E2E_NIGHTLY_DEFAULT_USER_USERNAME=hibou
export E2E_NIGHTLY_DEFAULT_USER_PASSWORD=HuluHulu
```
**Note** - if password or token values in the configuration file are declared with the value _"ENV"_ then they must be defined by an environment variable as shown above. Failure to define the values in the environment will lead to 400 bad request and similar errors, for example when creating users at the start of a test feature.
**User Generation**
In the configration file the key `create_method` defines the method to be used to create the user and associated artifacts. Four values for this key are recognized.
* `REST` - use the rest endpoint to create the user directly. Recommended.
* `CLI` - use the command line client to create the user. Experimental. **_CAUTION_** Deletes the file `${USER_HOME}/.influxdbv2/configs` and regenerates it. Depends on additional special configuration keys:
* `influx_path` - path to the `influx` client executable, used to create the user.
* `CLI_DOCKER` - use the command line client inside the docker container. Experimental. Depends on additional special configuration keys:
* `docker_name` - name of the docker container in which influxdbv2 is running.
* `SKIP` - skip user creation. It is assumed the user account will already exist in the deployment under test.
Note that in the Containerized version described below, the `CLI` and `CLI_DOCKER` user generation modes do not currently (7.2020) work.
### Containerized test runs against Selenoid
In June 2020 scripts were prepared to containerize the tests using a standard node version 12 container from docker and Selenoid browser containers. This approach should make it easier to port the test infrastructure into other CI pipelines as well as to expand browser coverage.
The entire process is defined in the script `./scripts/containerTests.sh`.
This script does the following:
1. Stops and tears down any existing docker container containing these tests.
1. Stops and tears down any running Selenoid containers.
1. Restarts Selenoid via the script `./scripts/selenoid.sh`.
1. Rebuilds the docker image containing these tests. Note this is currently (7.2020) based on the standard docker nodejs v 12.16 image and uses `./scripts/Dokcerfile.tests`.
1. Executes the tests based on tag definitions passed to the script using the argument `-t` or `--tags` (defaults to "@influx-influx") and using the configuration passed through the optional argument `-c` or `--config` (defaults to "development").
Examples
```bash
$ scripts/containerTests.sh --tags "not @download-file"
$ scripts/containerTests.sh --tags "@feature-signin"
```
**Mapping directories between containers**
Note that this script maps the `etc` directory containing test data and upload files by linking it to the system `/tmp` directory and then mapping that volume into the docker containers. This solution will not work when selenoid and test containers are not hosted on the same machine.
**Debugging Selenoid**
Debugging Selenoid tests entails starting the `selenoid-ui` container and then accessing it at `http://localhost:8080/#/`.
```bash
scripts/selenoid.sh -debug
```
_Do not_ run the `containerTests.sh` script. Instead start the test as it is started in that script.
e.g.
```bash
sudo docker run -it -v `pwd`/report:/home/e2e/report -v `pwd`/screenshots:/home/e2e/screenshots \
-v /tmp/e2e/etc:/home/e2e/etc -v /tmp/e2e/downloads:/home/e2e/downloads \
-e SELENIUM_REMOTE_URL="http://${SELENOID_HOST}:4444/wd/hub" \
-e E2E_${ACTIVE_CONF^^}_INFLUX_URL="http://${INFLUX2_HOST}:8086" --detach \
--name ${TEST_CONTAINER} e2e-${TEST_CONTAINER}:latest
```
Then run tests against it.
```bash
sudo docker exec ${TEST_CONTAINER} npm test -- activeConf=${ACTIVE_CONF} --tags "$TAGS"
```
Test runs can then be monitored through the Selenoid UI. Open the active session and log and VNC windows will open.
**Video with Selenoid**
It is also possible to record an MP4 of a debug test run. In the script `selenoid.sh` uncomment the following line:
```bash
sudo docker pull selenoid/video-recorder:latest-release
```
And for now, in `cucumber.js` uncomment the line:
```javascript
caps.set('enableVideo', true);
```
Then rerun the script `selenoid.sh` with the argument `-debug`.
### Light Weight Performance checks
For tests against the cloud a light weigh performance utility has been added. It currently exports only one method for tests: `execTimed( func, maxDelay, failMsg, successMsg)`. This method will execute the passed function and expect it to resolve by `maxDelay` milliseconds. Failures are thrown to cucumber and results are stored in a performance log buffer. This log is then dumped to the console after all tests have been run. They are also written to a CSV report file: `./report/performance.csv`.
For example, here is how it is used to check the redirect to the login page.
```javascript
async openCloudPage(maxDelay){
await perfUtils.execTimed(async () => {
await this.driver.get(__config.influx_url);
await this.loginPage.waitToLoad(10000);
},
maxDelay, `Redirect failed to resolve in ${maxDelay} ms`);
}
```
### Tips
Run only the feature under development
```bash
npm test -- features/onboarding/onboarding.feature:4
```
Number is line number where the target scenario starts. To run the whole featre it can be omitted.
Run the same headless
```bash
npm test headless=true -- features/onboarding/onboarding.feature:4
```
### API Notes
Steps classes should directly or indirectly inherit from the `baseSteps` class in `baseSteps.js`. This class contains some generic methods to streamline Selenium and Cucumber interactions. More will be added as the test suite grows. Here is a list as of 1.10.2019.
`assertNotPresent(selector)`
`assertNotVisible(element)`
`assertVisible(element)`
`clearInputText(input)`
`clickAndWait(element,
wait = async () => { await this.driver.sleep((await this.driver.manage().getTimeouts()).implicit/20); })`
`clickPopupWizardContinue()`
`clickPopupWizardPrevious()`
`clickPopupWizardFinish()`
`clickPopupCancelBtn()`
`closeAllNotifications()`
`containsNotificationText(text)`
`containsErrorNotification(text)`
`delay(timeout)`
`dismissPopup()`
`hoverOver(element)`
`typeTextAndWait(input, text,
wait = async () => { await this.driver.sleep((await this.driver.manage().getTimeouts()).implicit/20); })`
`verifyElementContainsText(element, text)`
`verifyElementContainsClass(element, clazz)`
`verifyElementDoesNotContainClass(element, clazz)`
`verifyElementDisabled(element)`
`verifyElementErrorMessage(msg, equal = true)`
`verifyElementText(element, text)`
`verifyInputErrorIcon()`
`verifyInputEqualsValue(input, value)`
`verifyInputContainsValue(input, value)`
`verifyInputDoesNotContainValue(input, value)`
`verifyNoElementErrorMessage()`
`verifyNoFormInputErrorIcon()`
`verifyPopupAlertContainsText(text)`
`verifyPopupAlertMatchesRegex(regex)`
`verifyPopupNotPresent()`
`verifyWizardContinueButtonDisabled()`
`verifyWizardDocsLinkURL(url)`
Pages should inherit directly or indirectly from the `basePage` class in `basePage.js`. This contains many common selectors and element getters found either in the over all framework or in common components such as wizards and popups.
The file `commonStepDefs.js` contains a library of test statements leveraging `baseSteps` and covering functionality that will often need to be repeated. It also contains steps for accessing methods from `influxUtils.js` for accessing the REST api through AXIOS, which is useful for setting up test data for a feature set.

View File

@ -1,24 +0,0 @@
Feature: Cloud Signin - Perf
Check basic loading times of cloud login
@perf-test
@cloud-test
Scenario: Perf - redirect to login
When open the cloud page in "3000" milliseconds
@perf-test
@cloud-test
Scenario: Perf: login to home
When I open the cloud login
When log in to the cloud in "3000" milliseconds
@perf-test
@cloud-test
Scenario: Perf - logout to account
# N.B. on free account first logout should load account info
When I logout to account info in "3000" milliseconds
@perf-test
@cloud-test
Scenario: Perf - logout to login
When I logout to login page in "3000" milliseconds

View File

@ -1,20 +0,0 @@
Feature: Cloud Signin - Func
Use and abuse the cloud signin page
@cloud-test
Scenario: login to cloud password
When I open the cloud login
When log in to the cloud
Then the home page is loaded
@cloud-test
Scenario: logout influx menu
When click nav menu item "User"
When click user nav item "Logout"
# Need second click - 1st should lead to account info
# TODO update when account info page loads - issue #19057
When click nav menu item "User"
When click user nav item "Logout"
Then the cloud login page is loaded
#Scenario: excersize login page

View File

@ -1,108 +0,0 @@
const chrome = require('selenium-webdriver/chrome');
const ffox = require('selenium-webdriver/firefox');
const fs = require('fs');
const {Builder, Capabilities, By, Key, LocalFileDetector, logging, PageLoadStrategy, promise, until} = require('selenium-webdriver');
//following provides cleaner paths in require statements
global.__basedir = __dirname;
global.__srcdir = __dirname + "/src";
global.__runtime = new Date();
global.__runtimeStr = __runtime.getFullYear().toString() +
(__runtime.getMonth() + 1).toString().padStart(2, '0') +
__runtime.getDate().toString().padStart(2, '0') + "-" +
__runtime.getHours().toString().padStart(2, '0') +
__runtime.getMinutes().toString().padStart(2, '0') +
__runtime.getSeconds().toString().padStart(2, '0');
const { flush, config, defaultUser } = require(__srcdir + '/utils/influxUtils');
global.__screenShotDir = process.cwd() + "/" + __config.screenshot_dir + "/" + __runtimeStr;
global.__dataBuffer = {};
fs.mkdirSync(__screenShotDir, { recursive: true });
var common = '--require "src/step_definitions/**/*.js" --require hooks.js --require-module babel-core/register ';
let caps = new Capabilities();
caps.set('enableVNC', true);
//caps.set('enableVideo', true);
caps.set('pageLoadStrategy', 'normal');
let chromeUserPreferences = { 'download.prompt_for_download': false, "download.default_directory": __config.download_dir };
let windowSize = { "width": 1024, "height": 768 };
console.log("DEBUG chromeUserPreferences " + JSON.stringify(chromeUserPreferences));
if(__config.window_size){
windowSize.width = parseInt(__config.window_size.width);
windowSize.height = parseInt(__config.window_size.height);
}
console.log("DEBUG windowSize " + JSON.stringify(windowSize));
let logPrefs = new logging.Preferences();
logPrefs.setLevel(logging.Type.BROWSER, logging.Level.ALL);
logPrefs.setLevel(logging.Type.DRIVER, logging.Level.INFO);
let chromeArguments = ['--no-sandbox'];
if(__config.sel_docker){
chromeArguments.push('--disable-dev-shm-usage')
}
if(__config.headless) {
caps.set('applicationCacheEnabled', false);
switch (__config.browser.toLowerCase()) {
case "chrome":
global.__wdriver = new Builder()
.withCapabilities(caps)
.forBrowser(__config.browser)
.setChromeOptions(new chrome.Options().headless()
.addArguments(chromeArguments)
.setUserPreferences(chromeUserPreferences)
.setLoggingPrefs(logPrefs)
.windowSize({width: windowSize.width, height: windowSize.height}))
.build();
break;
case "firefox":
global.__wdriver = new Builder()
.forBrowser(__config.browser)
.setFirefoxOptions(new ffox.Options().headless().windowSize({width: windowSize.width,
height: windowSize.height}))
.build();
break;
}
}else{
switch (__config.browser.toLowerCase()) {
case "chrome":
global.__wdriver = new Builder()
.withCapabilities(caps)
.forBrowser(__config.browser)
.setChromeOptions(new chrome.Options().addArguments("--incognito")
.addArguments(chromeArguments)
.setUserPreferences(chromeUserPreferences)
.setLoggingPrefs(logPrefs)
.windowSize({width: windowSize.width, height: windowSize.height}))
.build();
break;
case "firefox":
global.__wdriver = new Builder()
.withCapabilities(caps)
.forBrowser(__config.browser)
.build();
break;
}
}
__wdriver.manage().setTimeouts({implicit: 3000});
//__wdriver.setFileDetector(LocalFileDetector);
__wdriver.executor_.w3c = true;
console.log("DEBUG __wdriver: " + JSON.stringify(__wdriver));
module.exports = {
'default': common + '--format summary --format node_modules/cucumber-pretty --format json:report/cucumber_report.json',
dry: common + '--dry-run',
progress: common + '--format progress'
};

View File

@ -1,80 +0,0 @@
{
"active": "development",
"development" : {
"config_id" : "development",
"influx_url": "http://localhost:8086",
"def_ctx": "/",
"headless": false,
"sel_docker": false,
"deployment": "nightly_docker",
"create_method": "REST",
"docker_name": "influx2_solo",
"browser": "chrome",
"screenshot_dir": "screenshots",
"influxdb": {
"version" : "2.0.0"
},
"window_size": {
"width": "1024",
"height": "933"
},
"default_user": {
"username": "admin",
"password": "changeit",
"org": "qa",
"bucket": "qa",
"token": "TEST_TOKEN"
}
},
"nightly" : {
"config_id": "nightly",
"influx_url": "http://localhost:8086",
"def_ctx": "/",
"headless": true,
"sel_docker": false,
"deployment": "nightly_docker",
"browser": "chrome",
"screenshot_dir": "screenshots",
"create_method": "CLI_DOCKER",
"influx_path": "../bin/linux/influx",
"docker_name": "influx2_solo",
"influxdb": {
"version" : "2.0.0"
},
"default_user": {
"username": "hibou",
"password": "ENV",
"org": "qa",
"bucket": "qa",
"token": "ENV"
}
},
"cloud": {
"config_id" : "cloud",
"influx_url": "https://eu-central-1-1.aws.cloud2.influxdata.com",
"def_ctx": "/",
"headless": false,
"sel_docker": false,
"deployment": "cloud",
"create_method": "SKIP",
"browser": "chrome",
"screenshot_dir": "screenshots",
"influxdb": {
"version" : "2.0.0"
},
"window_size": {
"width": "1024",
"height": "933"
},
"default_user": {
"username": "qa1@bonitoo4influxdata.com",
"password": "ENV",
"org": "qa1@bonitoo4influxdata.com",
"bucket": "qa1A",
"orgid": "8864d10598fc08a7",
"bucketid": "7e0486a588f2f20a",
"token": "ENV"
}
}
}

View File

@ -1,48 +0,0 @@
{
"chrome": {
"default": "83.0",
"versions": {
"81.0": {
"image": "selenoid/chrome:81.0",
"port": "4444",
"path": "/"
},
"83.0": {
"image": "selenoid/vnc:chrome_83.0",
"volumes": [ "/tmp/e2e/etc:/home/e2e/etc", "/tmp/e2e/downloads:/home/selenium/Downloads" ],
"port": "4444",
"path": "/"
}
}
},
"firefox": {
"default": "77.0",
"versions": {
"76.0": {
"image": "selenoid/firefox:76.0",
"port": "4444",
"path": "/wd/hub"
},
"77.0": {
"image": "selenoid/firefox:77.0",
"port": "4444",
"path": "/wd/hub"
}
}
},
"opera": {
"default": "68.0",
"versions": {
"67.0": {
"image": "selenoid/opera:67.0",
"port": "4444",
"path": "/"
},
"68.0": {
"image": "selenoid/opera:68.0",
"port": "4444",
"path": "/"
}
}
}
}

View File

@ -1,282 +0,0 @@
{
"meta": {
"version": "1",
"type": "dashboard",
"name": "Alpha Centauri-Template",
"description": "template created from dashboard: Alpha Centurai"
},
"content": {
"data": {
"type": "dashboard",
"attributes": {
"name": "Alpha Centauri",
"description": ""
},
"relationships": {
"label": {
"data": []
},
"cell": {
"data": [
{
"type": "cell",
"id": "04ce10261819e000"
},
{
"type": "cell",
"id": "04ce1047b959e000"
},
{
"type": "cell",
"id": "04ce106158d9e000"
}
]
},
"variable": {
"data": []
}
}
},
"included": [
{
"id": "04ce10261819e000",
"type": "cell",
"attributes": {
"x": 0,
"y": 0,
"w": 4,
"h": 6
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce10261819e000"
}
}
}
},
{
"id": "04ce1047b959e000",
"type": "cell",
"attributes": {
"x": 4,
"y": 0,
"w": 8,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce1047b959e000"
}
}
}
},
{
"id": "04ce106158d9e000",
"type": "cell",
"attributes": {
"x": 4,
"y": 3,
"w": 8,
"h": 3
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce106158d9e000"
}
}
}
},
{
"type": "view",
"id": "04ce10261819e000",
"attributes": {
"name": "Hydro",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"hydro\")\n |> filter(fn: (r) => r._field == \"level\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "line",
"colors": [
{
"id": "2114e3a7-f157-4f0f-ad7c-b953d3cb7cc6",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "3fc62935-3abc-47ba-a7ab-d44a19bbcc3f",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "a55a66a7-0f89-4608-9550-f1cae7bf3cf0",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false,
"hoverDimension": "y"
}
}
},
{
"type": "view",
"id": "04ce1047b959e000",
"attributes": {
"name": "Sinusoid",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"sine\")\n |> filter(fn: (r) => r._field == \"beat\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "line",
"colors": [
{
"id": "2114e3a7-f157-4f0f-ad7c-b953d3cb7cc6",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "3fc62935-3abc-47ba-a7ab-d44a19bbcc3f",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "a55a66a7-0f89-4608-9550-f1cae7bf3cf0",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false,
"hoverDimension": "y"
}
}
},
{
"type": "view",
"id": "04ce106158d9e000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": "This is just a test dashboard to be used for import."
}
}
}
]
},
"labels": []
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,176 +0,0 @@
{
"meta": {
"name": "Hydro test dashboard-Template",
"type": "dashboard",
"description": "template created from dashboard: Hydro test dashboard",
"version": "1",
"createdAt": "2019-10-21T12:46:22.452466985Z",
"updatedAt": "2019-10-21T12:46:22.452467111Z"
},
"content": {
"data": {
"attributes": {
"description": "",
"name": "Hydro test dashboard"
},
"relationships": {
"cell": {
"data": [
{
"id": "04a79573194a5000",
"type": "cell"
},
{
"id": "04a795c71d4a5000",
"type": "cell"
}
]
},
"label": {
"data": []
},
"variable": {
"data": []
}
},
"type": "dashboard"
},
"included": [
{
"attributes": {
"h": 4,
"w": 4,
"x": 0,
"y": 0
},
"id": "04a79573194a5000",
"relationships": {
"view": {
"data": {
"id": "04a79573194a5000",
"type": "view"
}
}
},
"type": "cell"
},
{
"attributes": {
"h": 4,
"w": 4,
"x": 4,
"y": 0
},
"id": "04a795c71d4a5000",
"relationships": {
"view": {
"data": {
"id": "04a795c71d4a5000",
"type": "view"
}
}
},
"type": "cell"
},
{
"attributes": {
"name": "Name this Cell",
"properties": {
"axes": {
"x": {
"base": "10",
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"scale": "linear",
"suffix": ""
},
"y": {
"base": "10",
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"scale": "linear",
"suffix": ""
}
},
"colors": [
{
"hex": "#31C0F6",
"id": "f583e27b-5ada-4eb2-9ac6-37af00f3c016",
"name": "Nineteen Eighty Four",
"type": "scale",
"value": 0
},
{
"hex": "#A500A5",
"id": "26bb82bd-364a-4ff6-b0ce-5905adc15bf2",
"name": "Nineteen Eighty Four",
"type": "scale",
"value": 0
},
{
"hex": "#FF7E27",
"id": "932f9e8b-1aee-49b7-841a-238bb2a73ea9",
"name": "Nineteen Eighty Four",
"type": "scale",
"value": 0
}
],
"geom": "line",
"legend": {},
"note": "",
"queries": [
{
"builderConfig": {
"aggregateWindow": {
"period": "auto"
},
"buckets": [],
"functions": [],
"tags": [
{
"key": "_measurement",
"values": []
}
]
},
"editMode": "advanced",
"name": "",
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"hydro\")\n |> filter(fn: (r) => r._field == \"level\")"
}
],
"shadeBelow": false,
"hoverDimension": "y",
"shape": "chronograf-v2",
"showNoteWhenEmpty": false,
"type": "xy",
"xColumn": "_time",
"yColumn": "_value"
}
},
"id": "04a79573194a5000",
"type": "view"
},
{
"attributes": {
"name": "Name this Cell",
"properties": {
"note": "This is dashboard shows randomized hydrological data for a month time window. To see the curve set the time window to at least 2d. ",
"shape": "chronograf-v2",
"type": "markdown"
}
},
"id": "04a795c71d4a5000",
"type": "view"
}
]
},
"labels": []
}

View File

@ -1 +0,0 @@
bad data

View File

@ -1,68 +0,0 @@
{
"meta": {
"name": "Note Dashboard-Template",
"type": "dashboard",
"description": "template created from dashboard: Note Dashboard",
"version": "1",
"createdAt": "2019-10-21T14:16:31.163226513Z",
"updatedAt": "2019-10-21T14:16:31.163226637Z"
},
"content": {
"data": {
"attributes": {
"description": "",
"name": "Note Dashboard"
},
"relationships": {
"cell": {
"data": [
{
"id": "04a7aa8e284a5000",
"type": "cell"
}
]
},
"label": {
"data": []
},
"variable": {
"data": []
}
},
"type": "dashboard"
},
"included": [
{
"attributes": {
"h": 4,
"w": 4,
"x": 0,
"y": 0
},
"id": "04a7aa8e284a5000",
"relationships": {
"view": {
"data": {
"id": "04a7aa8e284a5000",
"type": "view"
}
}
},
"type": "cell"
},
{
"attributes": {
"name": "Name this Cell",
"properties": {
"note": "This dashboard just contains a note",
"shape": "chronograf-v2",
"type": "markdown"
}
},
"id": "04a7aa8e284a5000",
"type": "view"
}
]
},
"labels": []
}

View File

@ -1,100 +0,0 @@
{
"meta": {
"version": "1",
"type": "dashboard",
"name": "Notepad-Template",
"description": "template created from dashboard: Notepad"
},
"content": {
"data": {
"type": "dashboard",
"attributes": {
"name": "Notepad",
"description": ""
},
"relationships": {
"label": {
"data": []
},
"cell": {
"data": [
{
"type": "cell",
"id": "04a8ab4020f81000"
},
{
"type": "cell",
"id": "04a8ab5327b81000"
}
]
},
"variable": {
"data": []
}
}
},
"included": [
{
"id": "04a8ab4020f81000",
"type": "cell",
"attributes": {
"x": 0,
"y": 0,
"w": 4,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04a8ab4020f81000"
}
}
}
},
{
"id": "04a8ab5327b81000",
"type": "cell",
"attributes": {
"x": 4,
"y": 0,
"w": 4,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04a8ab5327b81000"
}
}
}
},
{
"type": "view",
"id": "04a8ab4020f81000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": "Simple note 1"
}
}
},
{
"type": "view",
"id": "04a8ab5327b81000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": "Simple note 2"
}
}
}
]
},
"labels": []
}

View File

@ -1,174 +0,0 @@
{
"meta": {
"version": "1",
"type": "dashboard",
"name": "Sinusoid test data-Template",
"description": "template created from dashboard: Sinusoid test data"
},
"content": {
"data": {
"type": "dashboard",
"attributes": {
"name": "Sinusoid test data",
"description": ""
},
"relationships": {
"label": {
"data": []
},
"cell": {
"data": [
{
"type": "cell",
"id": "04a8a9fb2f381000"
},
{
"type": "cell",
"id": "04a8aa39b4b81000"
}
]
},
"variable": {
"data": []
}
}
},
"included": [
{
"id": "04a8a9fb2f381000",
"type": "cell",
"attributes": {
"x": 0,
"y": 0,
"w": 4,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04a8a9fb2f381000"
}
}
}
},
{
"id": "04a8aa39b4b81000",
"type": "cell",
"attributes": {
"x": 4,
"y": 0,
"w": 4,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04a8aa39b4b81000"
}
}
}
},
{
"type": "view",
"id": "04a8a9fb2f381000",
"attributes": {
"name": "Beat goes on",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"sine\")\n |> filter(fn: (r) => r._field == \"beat\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "line",
"colors": [
{
"id": "07cc0b96-91db-4751-9548-e99502e7e825",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "81273781-dae1-4432-b8cd-7f5e235d632f",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "b8f3e7e2-4e5c-4e43-9604-7ae2f7295876",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false,
"hoverDimension": "y"
}
}
},
{
"type": "view",
"id": "04a8aa39b4b81000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": "Data generated over a 1 month time frame, so use at least 2d window to get a proper view. "
}
}
}
]
},
"labels": []
}

View File

@ -1,282 +0,0 @@
{
"meta": {
"version": "1",
"type": "dashboard",
"name": "Tau Ceti-Template",
"description": "template created from dashboard: Tau Ceti"
},
"content": {
"data": {
"type": "dashboard",
"attributes": {
"name": "Tau Ceti",
"description": ""
},
"relationships": {
"label": {
"data": []
},
"cell": {
"data": [
{
"type": "cell",
"id": "04ce423aabd9e000"
},
{
"type": "cell",
"id": "04ce4313b159e000"
},
{
"type": "cell",
"id": "04ce43c11ad9e000"
}
]
},
"variable": {
"data": []
}
}
},
"included": [
{
"id": "04ce423aabd9e000",
"type": "cell",
"attributes": {
"x": 0,
"y": 0,
"w": 12,
"h": 4
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce423aabd9e000"
}
}
}
},
{
"id": "04ce4313b159e000",
"type": "cell",
"attributes": {
"x": 0,
"y": 4,
"w": 7,
"h": 2
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce4313b159e000"
}
}
}
},
{
"id": "04ce43c11ad9e000",
"type": "cell",
"attributes": {
"x": 7,
"y": 4,
"w": 5,
"h": 2
},
"relationships": {
"view": {
"data": {
"type": "view",
"id": "04ce43c11ad9e000"
}
}
}
},
{
"type": "view",
"id": "04ce423aabd9e000",
"attributes": {
"name": "Hydro derivative",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"hydro\")\n |> filter(fn: (r) => r._field == \"level\")\n |> derivative(unit: v.windowPeriod, nonNegative: false)\n |> yield(name: \"derivative\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "line",
"colors": [
{
"id": "6b3be0c4-ed87-4df3-b849-94ab15e9a254",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "1b30d357-e796-493b-a423-38aa3c850980",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "871f9ba2-5042-4643-a0a0-355b76f5990b",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false,
"hoverDimension": "y"
}
}
},
{
"type": "view",
"id": "04ce4313b159e000",
"attributes": {
"name": "Sinusoid sum - missed points",
"properties": {
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"sine\")\n |> filter(fn: (r) => r._field == \"beat\")\n |> aggregateWindow(every: 1h, fn: sum)\n |> yield(name: \"sum\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
"buckets": [],
"tags": [
{
"key": "_measurement",
"values": []
}
],
"functions": [],
"aggregateWindow": {
"period": "auto"
}
}
}
],
"axes": {
"x": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
},
"y": {
"bounds": [
"",
""
],
"label": "",
"prefix": "",
"suffix": "",
"base": "10",
"scale": "linear"
}
},
"type": "xy",
"legend": {},
"geom": "line",
"colors": [
{
"id": "6b3be0c4-ed87-4df3-b849-94ab15e9a254",
"type": "scale",
"hex": "#31C0F6",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "1b30d357-e796-493b-a423-38aa3c850980",
"type": "scale",
"hex": "#A500A5",
"name": "Nineteen Eighty Four",
"value": 0
},
{
"id": "871f9ba2-5042-4643-a0a0-355b76f5990b",
"type": "scale",
"hex": "#FF7E27",
"name": "Nineteen Eighty Four",
"value": 0
}
],
"note": "",
"showNoteWhenEmpty": false,
"xColumn": "_time",
"yColumn": "_value",
"shadeBelow": false,
"hoverDimension": "y"
}
}
},
{
"type": "view",
"id": "04ce43c11ad9e000",
"attributes": {
"name": "Name this Cell",
"properties": {
"shape": "chronograf-v2",
"type": "markdown",
"note": "This is just a test dashboard. Ceci n'est qu'un tableau d'essai. Tohle jsou jen zkusebni deska. "
}
}
}
]
},
"labels": []
}

View File

@ -1,30 +0,0 @@
{
"id":null,
"type":"deadman",
"status":"active",
"activeStatus":"active",
"name":"Deadman Crit Check",
"query":
{
"name":"",
"text":"from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"test\")\n |> filter(fn: (r) => r[\"_field\"] == \"val\")",
"editMode":"builder",
"builderConfig":
{
"buckets":["qa"],
"tags":[{"key":"_measurement","values":["test"],"aggregateFunctionType":"filter"},{"key":"_field","values":["val"],"aggregateFunctionType":"filter"},{"key":"gen","values":[],"aggregateFunctionType":"filter"}],
"functions":[]
},
"hidden":false
},
"orgID":"05a7c4e449675000",
"labels":[],
"every":"5s",
"level":"CRIT",
"offset":"2s",
"reportZero":false,
"staleTime":"1m",
"statusMessageTemplate":"Check: ${ r._check_name } is: ${ r._level }",
"tags":[],
"timeSince":"30s"
}

View File

@ -1,36 +0,0 @@
{
"id":null,
"type":"threshold",
"status":"active",
"activeStatus":"active",
"name":"Threshold Check from File",
"query":{
"name":"",
"text":"from(bucket: \"qa\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"test\")\n |> filter(fn: (r) => r[\"_field\"] == \"val\")\n |> aggregateWindow(every: 5s, fn: mean)\n |> yield(name: \"mean\")",
"editMode":"builder",
"builderConfig": {
"buckets":["qa"],
"tags":[
{"key":"_measurement","values":["test"],"aggregateFunctionType":"filter"},
{"key":"_field","values":["val"],"aggregateFunctionType":"filter"},
{"key":"gen","values":[],"aggregateFunctionType":"filter"}
],
"functions":[
{"name":"mean"}
],
"aggregateWindow":{"period":"5s"}
},
"hidden":false
},
"orgID":"05a67e89563c3000",
"labels":[],
"every":"5s",
"offset":"1s",
"statusMessageTemplate":"Check: ${ r._check_name } is: ${ r._level }",
"tags":[],
"thresholds":[
{"type":"greater","value":7.5,"level":"CRIT"},
{"type":"lesser","value":1.5,"level":"WARN"},
{"type":"range","level":"INFO","min":4.5,"max":5.5,"within":true}
]
}

View File

@ -1,44 +0,0 @@
{
"meta": {
"version": "1",
"type": "variable",
"name": "Arsenal-Template",
"description": "template created from variable: Arsenal"
},
"content": {
"data": {
"type": "variable",
"attributes": {
"name": "Arsenal",
"arguments": {
"type": "constant",
"values": [
"Henry",
"Wright",
"Bastin",
"Radford",
"Brain",
"Drake",
"Lishman",
"van Persie",
"Hulme",
"Jack"
]
},
"selected": [
"Henry"
]
},
"relationships": {
"variable": {
"data": []
},
"label": {
"data": []
}
}
},
"included": []
},
"labels": []
}

View File

@ -1,44 +0,0 @@
{
"meta": {
"version": "1",
"type": "variable",
"name": "Slavia-Template",
"description": "template created from variable: Slavia"
},
"content": {
"data": {
"type": "variable",
"attributes": {
"name": "Slavia",
"arguments": {
"type": "constant",
"values": [
"cestina",
"polstina",
"slovenstina",
"serbstina",
"chorvatstina",
"bosenstina",
"bulharstina",
"ukranstina",
"belorustina",
"rustina"
]
},
"selected": [
"cestina"
]
},
"relationships": {
"variable": {
"data": []
},
"label": {
"data": []
}
}
},
"included": []
},
"labels": []
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,39 +0,0 @@
{
"meta": {
"version": "1",
"type": "variable",
"name": "Jehlicnany-Template",
"description": "template created from variable: Jehlicnany"
},
"content": {
"data": {
"type": "variable",
"attributes": {
"name": "Jehlicnany",
"arguments": {
"type": "map",
"values": {
"borovice": "pinus",
"jedle": "abies",
"modrin": "larix",
"tis": "taxus",
"zerav": "tuje"
}
},
"selected": [
"jedle"
]
},
"relationships": {
"variable": {
"data": []
},
"label": {
"data": []
}
}
},
"included": []
},
"labels": []
}

View File

@ -1,37 +0,0 @@
{
"meta": {
"version": "1",
"type": "variable",
"name": "Ryby-Template",
"description": "template created from variable: Ryby"
},
"content": {
"data": {
"type": "variable",
"attributes": {
"name": "Ryby",
"arguments": {
"type": "map",
"values": {
"kapr": "Cyprinus carpio",
"lin": "Tinca tinca",
"losos": "Salmo salar",
"pstruh": "Salmo trutta",
"sih": "Coregonus"
}
},
"selected": null
},
"relationships": {
"variable": {
"data": []
},
"label": {
"data": []
}
}
},
"included": []
},
"labels": []
}

View File

@ -1,34 +0,0 @@
{
"meta": {
"version": "1",
"type": "variable",
"name": "bucket-Template",
"description": "template for variable - bucket"
},
"content": {
"data": {
"type": "variable",
"attributes": {
"name": "Bucket",
"arguments": {
"type": "query",
"values": {
"query": "buckets()\n |> filter(fn: (r) => r.name !~ /^_/)\n |> rename(columns: {name: \"_value\"})\n |> keep(columns: [\"_value\"])\n",
"language": "flux"
}
},
"selected": null
},
"relationships": {
"variable": {
"data": []
},
"label": {
"data": []
}
}
},
"included": []
},
"labels": []
}

View File

@ -1,694 +0,0 @@
@feature-dashboards
@dashboards-cellEdit
Feature: Dashboards - Dashboard - Cell Edit
As a user I want to Create and Update Cells
So that I can view specific Influxdbv2 data
@tested
Scenario: Load Cell Edit View
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Dashboards"
# When hover over the "Dashboards" menu item
# When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When API sign in user "DEFAULT"
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"pulse", "start": "-48h", "algo": "log", "prec": "sec", "name": "beat"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 7200, "measurement":"signal", "start": "-30d", "algo": "sine", "prec": "sec", "name": "foo"}
"""
When click the empty Create dashboard dropdown button
When click the create dashboard item "New Dashboard"
Then the new dashboard page is loaded
Then the empty dashboard contains a documentation link
Then the empty dashboard contains Add a Cell button
When name dashboard "Fitness"
# +page-title - edit name this cell # covered in dashboard test
# +Graph dropdown
# +cog-cell--button
# +cancel-cell-edit--button
# +save-cell--button # already covered in dashboard test
# time-machine--view
# +empty-graph--no-queries
# +giraffe-autosizer
# +raw-data-table
# time-machine--bottom
# +raw-data--toggle
# +CSV download
# +Refresh Rate
# +Reload
# +Time Range
# +switch-to-script-editor
# +Submit#
# +Add Query
# +Queries
# +Builder
# +Schema navigator
# +Aggregate functions
# +Script Editor
# +Aggregate functions
# +Variables
@tested
Scenario: Exercise Basic Cell Edit Controls
When click the empty create cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "Kliky"
When click dashboard cell edit cancel button
Then there is no dashboard cell named "Kliky"
When click the empty create cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "Kliky"
When click the dashboard cell view type dropdown
Then the dashboard cell view type dropdown list contains:
"""
xy,line-plus-single-stat,heatmap,histogram,single-stat,gauge,table,scatter
"""
When click the dashboard cell view type dropdown
Then the cell view type dropdown list is not present
When click cell view customize button
Then the view options container is present
Then the cell view customize button is highlighted
When click cell view customize button
Then the view options container is not present
Then the cell view customize button is not highlighted
Then the time machine view empty queries graph is visible
When click time machine autorefresh dropdown
Then the time machine autorefresh dropdown list contains:
"""
Paused,5s,10s,30s,60s
"""
When select the time machine autorefresh rate "60s"
Then the time machine force refresh button is not present
When click time machine autorefresh dropdown
When select the time machine autorefresh rate "Paused"
Then the time machine force refresh button is present
When click the cell edit Time Range Dropdown
Then the time machine Time Range dropdown list contains:
"""
Custom Time Range,Past 5m,Past 15m,Past 1h,Past 6h,Past 12h,Past 24h,Past 2d,Past 7d,Past 30d
"""
When click the cell edit Time Range Dropdown
Then the time machine Time Range dropdown list is not present
Then the time machine query builder is visible
When click the cell edit Script Editor button
Then the time machine flux editor is visible
When click the cell edit Query Builder button
When click the time machine flux editor
Then the time machine flux editor is visible
Then the time machine switch to Query Builder warning is not present
When click the cell edit Query Builder button
When click the cell edit Query Builder confirm button
Then the time machine query builder is visible
Then the time machine switch to Query Builder warning is not present
Then the time machine flux editor is not present
When click dashboard cell save button
Then the dashboard contains a cell named "Kliky"
# ~~page-title -- name edit
# ~~Graph drop down
# ~~cog-cell--button
# cancel-cell-edit--button
# save-cell-edit--button
# ~~time-machine--view
# ~~empty-graph--no-queries
# time-machine--bottom
# ~~Refresh Rate -- N.B. pause has update button which disappears with other refresh rate values
# ~~Time Range
# ~~switch-to-script-editor
# ~~switch-to-query-builder
@tested
Scenario: Exercise Query Builder
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then the cell edit overlay is loaded as "Kliky"
Then the time machine cell edit submit button is disabled
Then the edit cell bucket selector contains buckets:
"""
qa,_monitoring,_tasks
"""
When filter the time machine bucket selector with "t"
Then the edit cell bucket selector contains buckets:
"""
_monitoring,_tasks
"""
Then the bucket "qa" is not present in the time machine bucket selector
When clear the time machine bucket selector filter
Then the edit cell bucket selector contains buckets:
"""
qa,_monitoring,_tasks
"""
When click the time machine bucket selector item "_monitoring"
Then time machine builder card "1" contains the empty tag message
When click the time machine bucket selector item "qa"
Then there are "1" time machine builder cards
Then time machine builder card "1" contains:
"""
beat,foo
"""
When click the tag selector dropdown of builder card "1"
Then the tag selector dropdown of builder card "1" contains:
"""
_field,_measurement,test
"""
When click the tag selector dropdown item "_field" of builder card "1"
Then time machine builder card "1" contains:
"""
pulse,signal
"""
When click the tag selector dropdown of builder card "1"
When click the tag selector dropdown item "_measurement" of builder card "1"
Then time machine builder card "1" contains:
"""
beat,foo
"""
When filter the tags in time machine builder card "1" with "eat"
Then time machine builder card "1" does not contain "foo"
When click the tag "beat" in builder card "1"
Then the time machine cell edit submit button is enabled
Then there are "2" time machine builder cards
Then time machine builder card "2" contains:
"""
pulse
"""
When filter the tags in time machine builder card "2" with "ratfink"
Then time machine builder card "2" is empty
When clear the tags filter in time machine builder card "2"
Then time machine builder card "2" contains:
"""
pulse
"""
When clear the tags filter in time machine builder card "1"
Then time machine builder card "1" contains:
"""
beat,foo
"""
When click the tag "foo" in builder card "1"
Then time machine builder card "2" contains:
"""
pulse,signal
"""
Then the selector count for builder card "1" contains the value "2"
When click the tag selector dropdown of builder card "2"
Then the tag selector dropdown of builder card "2" contains:
"""
_field,test
"""
When click the tag selector dropdown of builder card "2"
Then the contents of tag selector dropodwn of build card "2" are not present
When click the tag "foo" in builder card "1"
Then the selector count for builder card "1" contains the value "1"
When click the tag "beat" in builder card "1"
Then the selector counf for builder card "1" is not present
Then the delete button for builder card "1" is not present
When click delete for builder card "2"
Then there are "1" time machine builder cards
# Check coverage of issue 16682 once fixed
@tested
Scenario: Exercise Query Builder Functions
# TODO 16682 - following will not have been reset
# Then the time machine query builder function duration period is "auto"
When click the tag "beat" in builder card "1"
Then the time machine query builder function duration period is "auto (10s)"
When click the custom function group
Then the query builder function list contains
"""
mean, median, max, min, sum, derivative, nonnegative derivative, distinct, count, increase,
skew, spread, stddev, first, last, unique, sort
"""
# 7.8.20 - filter feature no longer present
# When filter the query builder function list with "rx"
# Then the query builder function list has "0" items
# When clear the query builder function lis filter
# Then the query builder function list contains
# """
# mean, median, max, min, sum, derivative, nonnegative derivative, distinct, count, increase,
# skew, spread, stddev, first, last, unique, sort
# """
# When filter the query builder function list with "in"
# Then the query builder function list contains
# """
# min,distinct,increase
# """
# Then the query builder function list has "3" items
When click the time machine query builder function custom duration tab
When click the time machine query builder function duration input
Then the query builder function duration suggestion drop down contains "12" suggestions
Then the query builder function duration suggestion drop down includes
"""
5s,15s,1m,5m,15m,1h,6h,12h,24h,2d,7d,30d
"""
When click the query builder function duration suggestion "7d"
Then the time machine query builder function duration period is "7d"
When click the time machine query builder function duration input
When click the time machine query builder function auto duration tab
# When click the query builder function duration suggestion "auto (10s)"
Then the time machine query builder function duration period is "auto (10s)"
When click dashboard cell edit cancel button
@tested
Scenario: Create basic query
Then the cell named "Kliky" contains the empty graph message
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then the time machine view no results is visible
Then the time machine cell edit submit button is disabled
When click the time machine bucket selector item "qa"
When click the tag "beat" in builder card "1"
Then the time machine cell edit submit button is enabled
When click the tag "pulse" in builder card "2"
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
Then the time machine cell edit preview axes are shown
@error-collateral
Scenario: Resize Preview
When get metrics of time machine cell edit preview
When get metrics of time machine query builder
When get time machine preview canvas
When get time machine preview axes
## Resize - larger
When resize time machine preview area by "{ "dw": "0", "dh": "+200" }"
# When wait "3" seconds
# Compare new dims Dashboard steps 387
Then the time machine preview area has changed by "{ "dw": "0", "dh": "+200" }"
Then the time machine query builder area has changed by "{ "dw": "0", "dh": "-200" }"
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
# Git dims again
When get metrics of time machine cell edit preview
When get metrics of time machine query builder
When get time machine preview canvas
When get time machine preview axes
# Resize - smaller
When resize time machine preview area by "{ "dw": "0", "dh": "-300" }"
# Compare new dims
Then the time machine preview area has changed by "{ "dw": "0", "dh": "-300" }"
Then the time machine query builder area has changed by "{ "dw": "0", "dh": "+300" }"
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click dashboard cell save button
Then the cell named "Kliky" contains a graph
@error-collateral
Scenario: Create Second Query
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then the time machine cell edit preview graph is shown
Then the time machine cell edit preview axes are shown
Then the bucket selected in the current time machine query is "qa"
Then the tag selected in the current time machine query card "1" is "beat"
Then the tag selected in the current time machine query card "2" is "pulse"
When get time machine preview canvas
When get time machine preview axes
When click the time machine query builder add query button
Then the bucket selected in the current time machine query is "qa"
Then there are "1" time machine builder cards
Then time machine builder card "1" contains:
"""
beat,foo
"""
Then there are no selected tags in time machine builder card "1"
When click the tag "foo" in builder card "1"
When click the tag "signal" in builder card "2"
When click the query builder function "mean"
When click the time machine query builder function custom duration tab
When click the time machine query builder function duration input
When click the query builder function duration suggestion "1m"
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click dashboard cell save button
Then the graph of the cell "Kliky" has changed
@error-collateral
Scenario: Change Query Name
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then query "Query 1" is the active query in query builder
When click on query "Query 2" in the query builder
Then the bucket selected in the current time machine query is "qa"
Then the tag selected in the current time machine query card "1" is "foo"
Then the tag selected in the current time machine query card "2" is "signal"
Then the functions selected in the current time machine query card are "mean"
When right click on the time machine query tab title "Query 2"
When click the time machine query tab right click menu item "Edit"
When enter "Dotaz B" into the time machine query tab name input
Then there is no time machine query tab named "Query 2"
Then query "Dotaz B" is the active query in query builder
@error-collateral
Scenario: Hide Query
When get time machine preview canvas
When get time machine preview axes
When click hide query of time machine query tab "Dotaz B"
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When get time machine preview canvas
When get time machine preview axes
When click hide query of time machine query tab "Dotaz B"
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click dashboard cell save button
@tested
Scenario: Delete Second Query
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When get the current graph of the cell "Kliky"
When right click the time machine query tab "Dotaz B"
When get time machine preview canvas
When get time machine preview axes
#When click delete of time machine query tab "Dotaz B"
When click the time machine query tab right click menu item "remove"
Then there is no time machine query tab named "Dotaz B"
Then there are "1" time machine query tabs
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click dashboard cell save button
Then the graph of the cell "Kliky" has changed
@tested
Scenario: Edit Query
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When get time machine preview canvas
When get time machine preview axes
When click the cell edit Script Editor button
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == "pulse")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
"""
When change the time machine script editor contents to:
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "foo")
|> filter(fn: (r) => r["_field"] == "signal")
"""
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click the cell edit save button
Then the graph of the cell "Kliky" has changed
@tested
Scenario: Switch to Query Builder
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "foo")
|> filter(fn: (r) => r["_field"] == "signal")
"""
When get time machine preview canvas
When get time machine preview axes
When click the cell edit Query Builder button
Then the time machine switch to Query Builder warning is present
When click the time machine flux editor
Then the time machine switch to Query Builder warning is not present
When click the cell edit Query Builder button
When click the cell edit Query Builder confirm button
Then the time machine query builder is visible
# Issue 16731 todo - check how query is reflected in query builder state
# 7.8.20 On change no longer changes canvas
#Then the time machine preview canvas has changed
#Then the time machine preview axes have changed
When click dashboard cell edit cancel button
Then the graph of the cell "Kliky" has not changed
@tested
Scenario: Edit invalid query
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "foo")
|> filter(fn: (r) => r["_field"] == "signal")
"""
When change the time machine script editor contents to:
"""
Muffin Man
"""
When click the time machine cell edit submit button
Then the time machine preview canvas is not present
Then the time machine preview canvas axes are not present
Then the time machine empty graph error message is:
"""
error @1:1-1:7: undefined identifier Muffin
"""
When click the cell edit save button
Then the cell named "Kliky" contains a graph error
# Popover has been replaced with message in cell
#When hover over the error icon of the cell "Kliky"
Then the cell error message of the cell named "Kliky" is:
"""
error @1:1-1:7: undefined identifier Muffin
"""
@tested
Scenario: Exercise Add functions - Query Builder
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When click the cell edit Query Builder button
When click the cell edit Query Builder confirm button
# TODO Clean up garbage from issue 16731
When close all time machine builder cards
When unselect any tags in time machine builder card "1"
When click the time machine bucket selector item "qa"
When click the tag "beat" in builder card "1"
Then the time machine cell edit submit button is enabled
When click the tag "pulse" in builder card "2"
When click the time machine cell edit submit button
When get time machine preview canvas
When get time machine preview axes
When click the time machine query builder function auto duration tab
#When click the time machine query builder function duration input
#When click the query builder function duration suggestion "auto (10s)"
When click the query builder function "mean"
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When get time machine preview canvas
When get time machine preview axes
When click the time machine query builder function custom duration tab
When click the time machine query builder function duration input
When click the query builder function duration suggestion "1m"
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When get time machine preview canvas
When get time machine preview axes
When click the custom function group
When click the query builder function "mean"
When click the query builder function "derivative"
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When get time machine preview canvas
When get time machine preview axes
When click the query builder function "derivative"
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click dashboard cell save button
Then the cell named "Kliky" contains a graph
@tested
Scenario: Edit Query - Exercise functions
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When click the cell edit Script Editor button
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == "pulse")
|> aggregateWindow(every: 1m, fn: mean, createEmpty: false)
|> yield(name: "mean")
"""
Then the time machine query edit function categories are displayed:
"""
Aggregates,Inputs,Type Conversions,Selectors,Transformations,Outputs,Miscellaneous,Tests
"""
When filter the time machine query edit function list with "average"
Then the following function are visible in the time machine function list:
"""
exponentialMovingAverage,movingAverage,timedMovingAverage,highestAverage,lowestAverage
"""
Then the following function are not visible in the time machine function list:
"""
doubleEMA,pearsonr,sum,first,lowestCurrent
"""
When clear the time machine query edit function list filter
Then the following function are visible in the time machine function list:
"""
doubleEMA,pearsonr,sum,first,lowestCurrent
"""
When hover over time machine query edit function "skew"
Then the time machine query edit function popup description contains:
"""
Outputs the skew of non-null records as a float.
"""
Then the time machine query edit function popup snippet contains:
"""
skew(column: "_value")
"""
When hover over the time machine query editor submit button
Then the time machine query edit function popup is not visible
When click dashboard cell edit cancel button
@tested
Scenario: Edit Query - Add a Function
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When click the cell edit Script Editor button
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == "pulse")
|> aggregateWindow(every: 1m, fn: mean, createEmpty: false)
|> yield(name: "mean")
"""
When get time machine preview canvas
When get time machine preview axes
When click the time machine flux editor
#When click the time machine query editor function "aggregateWindow"
When click inject the time machine query editor function "aggregateWindow"
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == "pulse")
|> aggregateWindow(every: 1m, fn: mean, createEmpty: false)
|> yield(name: "mean")
|> aggregateWindow(every: v.windowPeriod, fn: mean)
"""
# In CircleCi function popup can obscure the submit button
#When click the time machine flux editor
When click the filter functions input
When click the time machine cell edit submit button
Then the time machine preview canvas has changed
When click the cell edit save button
Then the graph of the cell "Kliky" has changed
@error-collateral
Scenario: Change time range
When get the current graph of the cell "Kliky"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When get time machine preview canvas
When get time machine preview axes
When click the cell edit Time Range Dropdown
When select the cell edit Time Range "past24h"
#When click the time machine flux editor
When click the filter functions input
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click the cell edit save button
Then the graph of the cell "Kliky" has changed
Then the dashboard Time Range Dropdown selected contains "Past 24h"
#When click the dashboard Time Range Dropdown
#When select dashboard Time Range "24h"
#Then the graph of the cell "Kliky" has changed
@error-collateral
Scenario: View raw data
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When get time machine preview canvas
When get time machine preview axes
Then the time machine raw data table is not present
When click time machine raw data toggle
Then the time machine raw data table is present
Then the time machine preview canvas is not present
When click time machine raw data toggle
Then the time machine preview canvas has changed
Then the time machine raw data table is not present
When click dashboard cell edit cancel button
Then the cell named "Kliky" contains a graph
@error-collateral @download-file
Scenario: Download results as CSV
When remove files ".*chronograf_data.csv" if exists
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When click time machine download CSV
Then a file matching ".*chronograf_data.csv" exists
When verify first CSV file matching ".*chronograf_data.csv" as containing
"""
{ "_time": "type:date", "_value": "type:double", "_field": "pulse", "_measurement": "beat", "test": "generic" }
"""
When click dashboard cell edit cancel button
Then the cell named "Kliky" contains a graph
@error-collateral
Scenario: Refresh Rates
#earlier signin may have timed out
When API sign in user "DEFAULT"
When toggle context menu of dashboard cell named "Kliky"
When click cell content popover configure
When get time machine preview canvas
When get time machine preview axes
When wait "20" seconds
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 5, "measurement":"pulse", "start": "-5m", "algo": "log", "prec": "sec", "name": "beat"}
"""
Then the time machine force refresh button is present
Then the time machine autorefresh dropdown list is set to "Paused"
When click time machine force refresh
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When get time machine preview canvas
When get time machine preview axes
When click time machine autorefresh dropdown
When select the time machine autorefresh rate "10s"
Then the time machine force refresh button is not present
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 5, "measurement":"pulse", "start": "-5m", "algo": "log", "prec": "sec", "name": "beat"}
"""
When wait "20" seconds
Then the time machine preview canvas has changed
Then the time machine preview axes have changed
When click time machine autorefresh dropdown
When select the time machine autorefresh rate "Paused"
When get time machine preview canvas
When get time machine preview axes
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 5, "measurement":"pulse", "start": "-5m", "algo": "log", "prec": "sec", "name": "beat"}
"""
When wait "20" seconds
Then the time machine preview canvas has not changed

View File

@ -1,350 +0,0 @@
@feature-dashboards
@dashboards-dashboard
Feature: Dashboards - Dashboard - Base
As a user I want to Read Create Update and Delete a Dashboard
So that I can view specific Influxdbv2 data
@tested
Scenario: Load Initial Dashboard view
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Dashboards"
# When hover over the "Dashboards" menu item
# When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When API sign in user "DEFAULT"
When API create a label "Cesko" described as "Pravda vitezi" with color "#AAFFAA" for user "DEFAULT"
When API create a label "Mesto" described as "Matka mest" with color "#FFAAAA" for user "DEFAULT"
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"level", "start": "-30d", "algo": "hydro", "prec": "sec", "name": "foo"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"beat", "start": "-30d", "algo": "sine", "prec": "sec", "name": "bar"}
"""
When click the empty Create dashboard dropdown button
When click the create dashboard item "New Dashboard"
Then the new dashboard page is loaded
Then the empty dashboard contains a documentation link
Then the empty dashboard contains Add a Cell button
When name dashboard "про́бный прибо́ров"
@error-collateral
Scenario: Exercise Dashboard Dropdowns
When click dashboard time locale dropdown
Then the active dashboard dropdown contains items:
"""
Local,UTC
"""
When click dashboard refresh dropdown
Then the active dashboard dropdown contains dividers:
"""
Refresh
"""
Then the active dashboard dropdown contains items:
"""
Paused,5s,10s,15s,30s,60s
"""
When click dashboard time range dropdown
Then the active dashboard dropdown contains dividers:
"""
Time Range
"""
Then the active dashboard dropdown contains items:
"""
Custom Time Range,Past 5m,Past 15m,Past 1h,Past 6h,Past 12h,Past 24h,Past 2d,Past 7d,Past 30d
"""
@tested
Scenario: Create Cell
When click the empty create cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "вре́менный"
When click dashboard cell edit cancel button
Then there is no dashboard cell named "вре́менный"
When click the empty create cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "вре́менный"
When click dashboard cell save button
Then the dashboard contains a cell named "вре́менный"
#Currently failing due to issue #16619
@tested
Scenario: Add Note to Cell
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover add note
Then the edit note popup is loaded
Then dismiss the popup
Then popup is not loaded
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover add note
Then click note popup cancel
Then popup is not loaded
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover add note
When enter the cell note popup CodeMirror text:
"""
__Шинель__\n
_Гоголь_\n
В департаменте но лучше не называть в каком департаменте...
"""
Then the cell note popup Markdown preview panel contains
"""
В департаменте но лучше не называть в каком департаменте...
"""
When click the cell note popup save button
Then popup is not loaded
Then the cell named "вре́менный" has a note indicator
When click the note indicator of the "вре́менный" cell
Then the cell note popover contains:
"""
В департаменте но лучше не называть в каком департаменте...
"""
When click the cell title "вре́менный"
Then the cell note popover is not loaded
When toggle context menu of dashboard cell named "вре́менный"
Then the cell content popover has item edit note
When click the cell title "вре́менный"
Then the cell content popover is not loaded
@tested
Scenario: Edit Cell Note
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover add note
Then the edit note popup is loaded
Then the cell note popup Code Mirror text contains:
"""
В департаменте но лучше не называть в каком департаменте...
"""
Then the cell note popup Code Mirror text contains:
"""
_Гоголь_
"""
Then the cell note popup Code Mirror text contains:
"""
__Шинель__
"""
Then the cell note popup Markdown preview panel contains
"""
В департаменте но лучше не называть в каком департаменте...
"""
When clear the cell note popup Code Mirror text
Then the cell note popup markup preview panel has no text
When enter the cell note popup CodeMirror text:
"""
__LE MANTEAU__\n
_Nikolaï Gogol_\n
Dans une administration russe... mieux vaut ne pas dire le nom de cette administration ...
"""
Then the cell note popup Markdown preview panel contains
"""
Dans une administration russe... mieux vaut ne pas dire le nom de cette administration ...
"""
When click the cell note popup save button
Then popup is not loaded
When click the note indicator of the "вре́менный" cell
Then the cell note popover contains:
"""
Dans une administration russe... mieux vaut ne pas dire le nom de cette administration ...
"""
When click the cell title "вре́менный"
Then the cell content popover is not loaded
@error-collateral
Scenario: Move cell
When get metrics of cell named "вре́менный"
When move the cell named "вре́менный" by "{ "dx": "+400", "dy": "+200" }"
# Y is 0 below because of float to top feature - cells float to top row when repositioned
Then the location of the cell named "вре́менный" is changed by "{ "dx": "+400", "dy": "0" }"
When get metrics of cell named "вре́менный"
When move the cell named "вре́менный" by "{ "dx": "-400", "dy": "+200" }"
Then the location of the cell named "вре́менный" is changed by "{ "dx": "-400", "dy": "0" }"
When get metrics of cell named "вре́менный"
When move the cell named "вре́менный" by "{ "dx": "0", "dy": "+200" }"
Then the location of the cell named "вре́менный" is changed by "{ "dx": "0", "dy": "0" }"
When move the cell named "вре́менный" by "{ "dx": "+400", "dy": "+200" }"
When get metrics of cell named "вре́менный"
When click nav menu item "home"
#When hover over the "Dashboards" menu item
#When click nav menu item "home"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
When click the dashboard name "про́бный прибо́ров"
Then the dashboard named "про́бный прибо́ров" is loaded
Then the location of the cell named "вре́менный" is unchanged
When move the cell named "вре́менный" by "{ "dx": "-400", "dy": "0" }"
@tested
Scenario: Edit Cell - Simple
Then the cell named "вре́менный" contains the empty graph message
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover configure
Then the cell edit overlay is loaded as "вре́менный"
When get the current cell edit preview graph
When click the cell edit Time Range Dropdown
When select the cell edit Time Range "Past 30d"
When click the cell edit Script Editor button
When paste into cell edit Script Editor
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r._measurement == "foo")
|> filter(fn: (r) => r._field == "level")
"""
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
Then the cell edit preview graph is changed
When click the cell edit save button
When click the dashboard Time Range Dropdown
When select dashboard Time Range "30d"
Then the cell named "вре́менный" contains a graph
@error-collateral
Scenario: Resize Cell
When get the current graph of the cell "вре́менный"
When get metrics of cell named "вре́менный"
When resize the cell name "вре́менный" by "{ "dw": "+300", "dh": "+100" }"
Then the graph of the cell "вре́менный" has changed
Then size of the cell named "вре́менный" has changed by "{ "dw": "+300", "dh": "+100" }"
# Leave then return check TODO after issue 16180 fixed
#When get the current graph of the cell "вре́менный"
#When get metrics of cell named "вре́менный"
#When hover over the "Dashboards" menu item
#When click nav menu item "home"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
#When click the dashboard name "про́бный прибо́ров"
#Then the dashboard named "про́бный прибо́ров" is loaded
#Then the size of the of the cell named "вре́менный" is unchangd
@error-collateral
Scenario: Hover Cell Graph
When hover over the graph of the cell named "вре́менный"
Then the cell graph data point infobox is visible
@error-collateral
Scenario: Zoom Cell horizontal
When get the current graph of the cell "вре́менный"
When move horizontally to "2/5" of graph cell named "вре́менный"
When drag horizontally to "3/5" of graph cell named "вре́менный"
Then the graph of the cell "вре́менный" has changed
@error-collateral
Scenario: Unzoom Cell
When get the current graph of the cell "вре́менный"
When Click at the point "{"x": "1/2", "y": "1/2"}" of graph cell named "вре́менный"
Then the graph of the cell "вре́менный" has changed
@error-collateral
Scenario: Zoom Cell vertical
When get the current graph of the cell "вре́менный"
When move vertically to "2/5" of graph cell named "вре́менный"
When drag vertically to "3/5" of graph cell named "вре́менный"
Then the graph of the cell "вре́менный" has changed
@error-collateral
Scenario: Unzoom Cell 2
When get the current graph of the cell "вре́менный"
When Click at the point "{"x": "1/2", "y": "1/2"}" of graph cell named "вре́менный"
Then the graph of the cell "вре́менный" has changed
@tested
Scenario: Rename Cell
When toggle context menu of dashboard cell named "вре́менный"
When click cell content popover configure
Then the cell edit overlay is loaded as "вре́менный"
When click on the cell edit name
When change the cell edit name to "dočasný"
When click the cell edit save button
Then the cell named "dočasný" is visible in the dashboard
@tested
Scenario: Clone Cell
When toggle context menu of dashboard cell named "dočasný"
When click cell edit content popover clone
Then the cell named "dočasný (Clone)" is visible in the dashboard
When toggle context menu of dashboard cell named "dočasný (Clone)"
When click cell content popover configure
When clear the cell edit Script Editor
When paste into cell edit Script Editor
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r._measurement == "foo")
|> filter(fn: (r) => r._field == "level")
|> movingAverage(n: 5)
"""
When click the time machine cell edit submit button
When click on the cell edit name
When change the cell edit name to "klouzavý průměr"
When click the cell edit save button
Then the graph of the cell "dočasný" differs from "klouzavý průměr"
# Following step fails due to issue #16619
When click the note indicator of the "klouzavý průměr" cell
Then the cell note popover contains:
"""
Dans une administration russe... mieux vaut ne pas dire le nom de cette administration ...
"""
When click the cell title "klouzavý průměr"
Then the cell content popover is not loaded
@error-collateral
Scenario: Two cells column to row
When get metrics of cell named "dočasný"
When get metrics of cell named "klouzavý průměr"
When move the cell named "dočasný" by "{ "dx": "+300", "dy": "0" }"
Then the location of the cell named "klouzavý průměr" is changed by "{ "dx": "0", "dy": "-380" }"
@error-collateral
Scenario: Two cells row to column
When get metrics of cell named "dočasný"
When get metrics of cell named "klouzavý průměr"
When move the cell named "dočasný" by "{ "dx": "-300", "dy": "0" }"
Then the location of the cell named "klouzavý průměr" is changed by "{ "dx": "0", "dy": "+380" }"
@error-collateral
Scenario: Two cells enlarge first into second
When get metrics of cell named "klouzavý průměr"
When move the cell named "dočasný" by "{ "dx": "+300", "dy": "0" }"
Then the location of the cell named "klouzavý průměr" is changed by "{ "dx": "0", "dy": "-380" }"
When get metrics of cell named "dočasný"
When get metrics of cell named "klouzavý průměr"
When resize the cell name "klouzavý průměr" by "{ "dw": "+300", "dh": "0" }"
Then the location of the cell named "dočasný" is changed by "{ "dx": "0", "dy": "+380" }"
Then size of the cell named "klouzavý průměr" has changed by "{ "dw": "+300", "dh": "0" }"
@error-collateral
Scenario: Two cells reduce first when above second
When get metrics of cell named "dočasný"
When get metrics of cell named "klouzavý průměr"
When resize the cell name "klouzavý průměr" by "{ "dw": "-300", "dh": "0" }"
Then the location of the cell named "dočasný" is changed by "{ "dx": "0", "dy": "-380" }"
Then size of the cell named "klouzavý průměr" has changed by "{ "dw": "-300", "dh": "0" }"
@error-collateral
Scenario: Two cells column to row - Moved cell drops down
When get metrics of cell named "dočasný"
When get metrics of cell named "klouzavý průměr"
When move the cell named "dočasný" by "{ "dx": "-150", "dy": "150" }"
Then the location of the cell named "dočasný" is changed by "{ "dx": "-150", "dy": "+380" }"
@tested
Scenario Outline: Delete Cell
When toggle context menu of dashboard cell named "<NAME>"
When click cell content popover delete
When click cell content popover delet confirm
# following should be notification-primary [data-testid=notification-primary]
#Then the success notification contains "Cell deleted from dashboard"
Then the primary notification contains "Cell deleted from dashboard"
Then close all notifications
Then the cell named "<NAME>" is no longer present
Examples:
|NAME|
|klouzavý průměr|
|dočasný |
# TODO - Dark Mode / Light Mode

View File

@ -1,309 +0,0 @@
@feature-dashboards
@dashboards-dashboards
Feature: Dashboards - Base
As a user I want to Read Create Update and Delete Dashboards
So that I can organize my data in Influxdbv2
@tested
Scenario: Load dashboards page
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When API sign in user "DEFAULT"
When API create a label "Cesko" described as "Pravda vitezi" with color "#AAFFAA" for user "DEFAULT"
When API create a label "Mesto" described as "Matka mest" with color "#FFAAAA" for user "DEFAULT"
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"level", "start": "-30d", "algo": "hydro", "prec": "sec", "name": "hydro"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"beat", "start": "-30d", "algo": "sine", "prec": "sec", "name": "sine"}
"""
@tested
Scenario: Create new dashboard
When click the empty Create dashboard dropdown button
Then the empty create dashboard dropdown list contains
"""
New Dashboard,Import Dashboard,From a Template
"""
When click the create dashboard item "New Dashboard"
Then the new dashboard page is loaded
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then the empty Create dashboard dropdown button is not present
Then there is a dashboard card named "Name this Dashboard"
@tested
Scenario: Rename dashboard from card
When hover over dashboard card named "Name this Dashboard"
Then the export button for the dashboard card "Name this Dashboard" is visible
Then the clone button for the dashboard card "Name this Dashboard" is visible
Then the delete button for the dashboard card "Name this Dashboard" is visible
When hover over dashboard card name "Name this Dashboard"
When click the edit dashboard card name button for "Name this Dashboard"
When clear the name input of the dashboard card "Name this Dashboard"
When enter the new name "Mercure" in the name input of the dashboard card "Name this Dashboard"
When press the "ENTER" key
Then there is a dashboard card named "Mercure"
Then there is no dashboard card named "Name this Dashboard"
@tested
Scenario: Add description to dashboard
Then the description for card "Mercure" contains "No description"
When hover over description of the dashboard card "Mercure"
When click the edit description button for the dashboard card "Mercure"
When enter into the dashboard card "Mercure" the description:
"""
le dieu du commerce dans la mythologie romaine
"""
When press the "ENTER" key
Then the description for card "Mercure" contains "le dieu du commerce dans la mythologie romaine"
@tested
Scenario: Add Labels to dashboard
# Issue 16529 - possible design change
When click empty label for the dashboard card "Mercure"
Then the label "Cesko" in the popover selector is visible
Then the label "Mesto" in the popover selector is visible
Then the create new label item is not visible in the popover
When enter "Slovensko" in the popover label selector filter
Then the create new label item is visible in the popover
Then there are "0" label pills in the select label popover
When click the new label item in the add labels popover
Then the create Label popup is loaded
When dismiss the popup
Then popup is not loaded
Then the add label popover is not present
When click the add label button for the dashboard card "Mercure"
# Issue 16528 - control values not cleared
Then there are "2" label pills in the select label popover
When enter "Slovensko" in the popover label selector filter
When click the new label item in the add labels popover
When click the label popup Create Label button
Then popup is not loaded
Then the dashboard card "Mercure" has the label "Slovensko"
When hover over the label "Slovensko" of the dashboard card "Mercure"
When click remove label "Slovensko" from the dashboard card "Mercure"
Then the dashboard card "Mercure" labels empty message is visible
Then the label "Slovenkso" of the dashboard card "Mercure" is not present
When click the add label button for the dashboard card "Mercure"
Then there are "3" label pills in the select label popover
When enter "sko" in the popover label selector filter
Then there are "2" label pills in the select label popover
Then the label "Mesto" is not present in the popover selector
When clear the popover label selector filter
Then there are "3" label pills in the select label popover
# TODO use escape key once #17853 is resolved
#When press the "ESCAPE" key
When click the dashboards filter input
Then the add label popover is not present
#TODO add check for issue #17964
@tested
Scenario Outline: Create new Dashboard
When click create dashboard control
When click the create dashboard item "New Dashboard"
When name dashboard "<NAME>"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then there is a dashboard card named "<NAME>"
Examples:
|NAME|
|Terre|
|Venus|
|Jupiter|
|Mars |
@tested
Scenario: Access Dashboard from home page
When hover over the "home" menu item
When click nav menu item "home"
Then the dashboards panel contains links:
"""
Mercure,Venus,Terre,Mars,Jupiter
"""
When click the dashboards panel link "Mercure"
Then the dashboard named "Mercure" is loaded
@tested
Scenario: Filter Dashboard Cards
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then the dashboards page contains the cards:
"""
Mercure,Venus,Terre,Mars,Jupiter
"""
When enter the term "ter" in the dashboards filter
Then the dashboards page contains the cards:
"""
Terre,Jupiter
"""
Then the dashboards page does not contain the cards:
"""
Mercure,Venus,Mars
"""
When clear the dashboards filter
Then the dashboards page contains the cards:
"""
Mercure,Venus,Terre,Mars,Jupiter
"""
@error-collateral
Scenario: Import Dashboard from file
When click create dashboard control
When click the create dashboard item "Import Dashboard"
Then the Import Dashboard popup is loaded
When upload the import dashboard file "etc/test-data/alpha_dashboard.json"
Then the import dashboard drag and drop header contains success "etc/test-data/alpha_dashboard.json"
When click the Import Dashboard button
Then popup is not loaded
Then the success notification contains "Successfully imported dashboard."
Then close all notifications
Then there is a dashboard card named "Alpha Centauri"
@tested
Scenario: Import Dashboard paste json
When click create dashboard control
When click the create dashboard item "Import Dashboard"
Then the Import Dashboard popup is loaded
When click the Import Dashboard popup radio button Paste Json
Then the Import Dashboard file upload control is not present
When paste contents of file "etc/test-data/tau_ceti_dashboard.json" into the JSON textarea
When click the Import Dashboard button
Then popup is not loaded
Then the success notification contains "Successfully imported dashboard."
Then close all notifications
Then there is a dashboard card named "Tau Ceti"
@tested
Scenario: Create Dashboard from template
When create a new template from the file "etc/test-data/sine-test-template.json" for user "DEFAULT"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When click create dashboard control
When click the create dashboard item "From a Template"
Then the Create Dashboard from Template popup is loaded
Then the Dashboard from Template create button is disabled
When click Dashboard from Template popup cancel button
Then popup is not loaded
When click create dashboard control
When click the create dashboard item "From a Template"
Then dismiss the popup
Then popup is not loaded
When click create dashboard control
When click the create dashboard item "From a Template"
When click the template item "Sinusoid test data-Template"
Then the template preview cell "Beat goes on" is visible
When click Dashboard from Template create button
Then there is a dashboard card named "Sinusoid test data"
@tested
Scenario: Sort Dashboards by Name
When close all notifications
Then the dashboards are sorted as:
"""
Alpha Centauri,Jupiter,Mars,Mercure,Sinusoid test data,Tau Ceti,Terre,Venus
"""
When click dashboards sort type dropdown
When click dashboards sort by "Name Desc"
#When click dashboards sort by name
Then the dashboards are sorted as:
"""
Venus,Terre,Tau Ceti,Sinusoid test data,Mercure,Mars,Jupiter,Alpha Centauri
"""
When click dashboards sort type dropdown
When click dashboards sort by "Name Asc"
Then the dashboards are sorted as:
"""
Alpha Centauri,Jupiter,Mars,Mercure,Sinusoid test data,Tau Ceti,Terre,Venus
"""
# Scenario: Sort Dashboards by Modified time
# TODO - implement after issue #15610 is resolved
@error-collateral
Scenario: Export Dashboard as Template
When hover over dashboard card named "Alpha Centauri"
When click export of the dashboard card named "Alpha Centauri"
When click confirm export of the dashboard card "Alpha Centauri"
When click Export Dashboard popup Save as Template
Then the success notification contains "Successfully saved dashboard as template"
Then a REST template document for user "DEFAULT" titled "Alpha Centauri-Template" exists
Then close all notifications
@error-collateral
Scenario: Export Dashboard copy to clipboard
When hover over dashboard card named "Jupiter"
When click export of the dashboard card named "Jupiter"
When click confirm export of the dashboard card "Jupiter"
When click Export Dashboard popup Copy to Clipboard
Then the success notification contains "Copied dashboard to the clipboard"
Then close all notifications
#N.B. clipboard not accessible for comparison in headless mode
When click the Export Dashboard dismiss button
Then popup is not loaded
@error-collateral @download-file
Scenario: Export Dashboard to file
When remove file "tau_ceti.json" if exists
When hover over dashboard card named "Tau Ceti"
When click export of the dashboard card named "Tau Ceti"
When click confirm export of the dashboard card "Tau Ceti"
Then the Export Dashboard popup is loaded
When click the Export Dashboard dismiss button
Then popup is not loaded
When hover over dashboard card named "Tau Ceti"
When click export of the dashboard card named "Tau Ceti"
When click confirm export of the dashboard card "Tau Ceti"
When click Export Dashboard popup Download JSON for "tau_ceti.json"
Then popup is not loaded
Then the file "tau_ceti.json" has been downloaded
When remove file "tau_ceti.json" if exists
@tested
Scenario: Clone Dashboard
When hover over dashboard card named "Tau Ceti"
When click clone of the dashboard card named "Tau Ceti"
When click the clone confirm of dashboard card "Tau Ceti"
Then the dashboard named "Tau Ceti (clone 1)" is loaded
Then the dashboard contains a cell named "Hydro derivative"
Then the dashboard contains a cell named "Sinusoid sum - missed points"
Then the dashboard contains a cell named "Note"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then there is a dashboard card named "Tau Ceti (clone 1)"
@tested
Scenario Outline: Delete dashboards
When hover over dashboard card named "<NAME>"
When click delete of dashboard card "<NAME>"
When click delete confirm of dashboard card "<NAME>"
Then the success notification contains "Dashboard <NAME> deleted successfully"
When close all notifications
Then there is no dashboard card named "<NAME>"
Examples:
|NAME|
|Mercure|
|Terre|
|Venus|
|Jupiter|
|Mars|
|Alpha Centauri|
|Tau Ceti|
|Tau Ceti (clone 1)|
|Sinusoid test data|

View File

@ -1,91 +0,0 @@
@feature-dashboards
@dashboards-noteCell
Feature: Dashboards - Dashboard - Note Cell
As a user I want to Add a Note Cell
So that I can provide specific static information
# Show note when query return no data makes little sense
# Uses Code Mirror still
Scenario: Create basic dashboard for notes
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Dashboards"
# When hover over the "Dashboards" menu item
# When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When click the empty Create dashboard dropdown button
When click the create dashboard item "New Dashboard"
Then the new dashboard page is loaded
Then the empty dashboard contains a documentation link
Then the empty dashboard contains Add a Cell button
When name dashboard "Rumcajs"
#N.B. expecting the toggle "show when query returns no data" to not be present
# TODO #17412 - add check that toggle not present to detect any regression
Scenario: Exercise Add Note popup controls
When click dashboard add note button
# N.B. add guide link check
Then main "Add" note popup is loaded
#Then the query no data toggle is not present
Then dismiss the popup
Then popup is not loaded
When click dashboard add note button
Then click note popup cancel
Then popup is not loaded
Scenario: Add Note with markdown
When click dashboard add note button
When enter the cell note popup CodeMirror text:
"""
# Večerníček
## Rumcajs
**Loupežník Rumcajs** je _pohádková postava_ z [Večerníčku](https://cs.wikipedia.org/wiki/Ve%C4%8Dern%C3%AD%C4%8Dek), jejíž příběhy následně vyšly i knižně.
> Jak Rumcajs vysadil duhu na nebe
* Rumcajs
* Manka
* Cipísek
1. Alpha
1. Beta
1. Gamma
"""
Then the main note popup markdown preview panel contains a "h1" tag with "Večerníček"
Then the main note popup markdown preview panel contains a "h2" tag with "Rumcajs"
Then the main note popup markdown preview panel contains a "strong" tag with "Loupežník Rumcajs"
Then the main note popup markdown preview panel contains a "em" tag with "pohádková postava"
Then the main note popup markdown preview panel contains a "blockquote" tag with "Jak Rumcajs vysadil duhu na nebe"
Then the main note popup markdown preview panel contains a "ul li" tag with "Rumcajs"
Then the main note popup markdown preview panel contains a "ol li" tag with "Alpha"
When click the cell note popup save button
Then popup is not loaded
Then the note cell contains a "h1" tag with "Večerníček"
Then the note cell contains a "h2" tag with "Rumcajs"
Then the note cell contains a "strong" tag with "Loupežník Rumcajs"
Then the note cell contains a "em" tag with "pohádková postava"
Then the note cell contains a "blockquote" tag with "Jak Rumcajs vysadil duhu na nebe"
Then the note cell contains a "ul li" tag with "Rumcajs"
Then the note cell contains a "ol li" tag with "Alpha"
@tested
Scenario: Edit note
When toggle context menu of dashboard cell named "Note"
When click cell content popover edit note
Then main "Edit" note popup is loaded
# TODO edit text and verify - need to push on to higher priority tests
When click note popup cancel
Scenario: Delete note
When toggle context menu of dashboard cell named "Note"
When click cell content popover delete
When click cell content popover delet confirm
Then the cell named "Note" is no longer present

View File

@ -1,344 +0,0 @@
@feature-dashboards
@dashboards-variables
Feature: Dashboards - Dashboard - Variables
As a user I want to Add Variables to cell Queries
So that I can view specific Influxdbv2 data sets
@tested
@tested
Scenario: Load Cell Edit View
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When clear browser storage
When UI sign in user "DEFAULT"
When click nav menu item "Dashboards"
#When hover over the "Dashboards" menu item
#When click nav sub menu "Dashboards"
Then the Dashboards page is loaded
When API sign in user "DEFAULT"
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"pulse", "start": "-48h", "algo": "log", "prec": "sec", "name": "beat"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 7200, "measurement":"signal", "start": "-30d", "algo": "sine", "prec": "sec", "name": "foo"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"sema", "start": "-48h", "algo": "log", "prec": "sec", "name": "beat"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"znacka", "start": "-48h", "algo": "log", "prec": "sec", "name": "beat"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"mots", "start": "-48h", "algo": "dico", "data": ["pulse","sema","znacka","wombat"], "prec": "sec", "name": "slovo"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 2880, "measurement":"worten", "start": "-48h", "algo": "dico", "data": ["alpha","beta"], "prec": "sec", "name": "logo"}
"""
When create the "csv" variable "APIVAR" with default "[ "pulse" ]" for user "DEFAULT" with values:
"""
[ "pulse", "sema", "znacka", "hele" ]
"""
When create the "query" variable "POKUS" with default "[ "pulse" ]" for user "DEFAULT" with values:
"""
{"language":"flux","query":"from(bucket: \"qa\")\n |> range(start: -1d, stop: now() )\n |> filter(fn: (r) => r._measurement == \"slovo\")\n |> filter(fn: (r) => r._field == \"mots\")\n |> unique(column: \"_value\")"}
"""
When create the "map" variable "KARTA" with default "[ "poppy" ]" for user "DEFAULT" with values:
"""
{ "poppy":"pulse","salvia":"sema","zinnia":"znacka","daisy":"duck" }
"""
When click the empty Create dashboard dropdown button
When click the create dashboard item "New Dashboard"
Then the new dashboard page is loaded
Then the empty dashboard contains a documentation link
Then the empty dashboard contains Add a Cell button
When name dashboard "Semiotic"
@error-collateral
Scenario: Create Basic Cell for Variables
When click the empty create cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "Semantic"
When click the time machine bucket selector item "qa"
When click the tag "beat" in builder card "1"
Then the time machine cell edit submit button is enabled
When click the tag "pulse" in builder card "2"
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
Then the time machine cell edit preview axes are shown
When click dashboard cell save button
Then the dashboard contains a cell named "Semantic"
@error-collateral
Scenario: Edit Query - Filter variables
When toggle context menu of dashboard cell named "Semantic"
When click cell content popover configure
When click the cell edit Script Editor button
Then the time machine script editor contains
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == "pulse")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
"""
When click the time machine script editor variables tab
Then the time machine variables list contains
"""
APIVAR,POKUS,KARTA
"""
When enter the value "AR" in the time machine variables filter
Then the time machine variables list contains
"""
APIVAR,KARTA
"""
Then the time machine variables list does not contain
"""
POKUS
"""
When clear the time machine variables filter
Then the time machine variables list contains
"""
APIVAR,POKUS,KARTA
"""
When click dashboard cell edit cancel button
Then the dashboard contains a cell named "Semantic"
# time-machine--bottom
# switch-to-script-editor
# Queries
# Script Editor
# Variables
@error-collateral
Scenario: Add CSV variable to script
When toggle context menu of dashboard cell named "Semantic"
When click cell content popover configure
When click the cell edit Script Editor button
# Move to end
When send keys "CTRL+END,AUP,AUP,END" to the time machine flux editor
# Send cursor to start of field value
When send keys "ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT" to the time machine flux editor
# Delete field value
When send keys "DEL,DEL,DEL,DEL,DEL,DEL,DEL" to the time machine flux editor
# Now check then add variable
When click the time machine script editor variables tab
Then the time machine variable popover is not visible
When hover over the time machine variable "APIVAR"
Then the time machine variable popover is visible
# TODO - No solution as yet to access popover contents - all action make popover disappear
#When hover over the time machine variable "APIVAR"
# When click time machine popover variable dropodown
When click inject the time machine variable "APIVAR"
When click the time machine cell edit submit button
When click dashboard cell save button
Then the dashboard variables button is highlighted
When get the current graph of the cell "Semantic"
When click the value dropdown button for variable "APIVAR"
Then the selected item of the dropdown for variable "APIVAR" is "pulse"
Then the value dropdown for variable "APIVAR" contains
"""
pulse,sema,znacka,hele
"""
When click the item "sema" for variable "APIVAR"
Then the graph of the cell "Semantic" has changed
When get the current graph of the cell "Semantic"
Then the selected item of the dropdown for variable "APIVAR" is "sema"
When click the value dropdown button for variable "APIVAR"
When click the item "hele" for variable "APIVAR"
Then the cell named "Semantic" has no results
When click the value dropdown button for variable "APIVAR"
When click the item "znacka" for variable "APIVAR"
Then the graph of the cell "Semantic" has changed
#When click dashboard cell edit cancel button
#Then the dashboard contains a cell named "Semantic"
#Script with Map variables
@error-collateral
Scenario: Add Map variable to script
Then the dashboard variables button is highlighted
When toggle context menu of dashboard cell named "Semantic"
When click cell content popover configure
#When click the cell edit Script Editor button
# Move to end
When send keys "CTRL+END,AUP,AUP,END" to the time machine flux editor
# Send cursor to start of field value
When send keys "ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT" to the time machine flux editor
# Delete field value
When send keys "DEL,DEL,DEL,DEL,DEL,DEL,DEL,DEL" to the time machine flux editor
# Now check then add variable
When click the time machine script editor variables tab
Then the time machine variable popover is not visible
When hover over the time machine variable "KARTA"
Then the time machine variable popover is visible
# TODO - No solution as yet to access popover contents - all action make popover disappear
# No solution as yet to access popover contents - all action make popover disappear
#When hover over the time machine variable "KARTA"
#When click time machine popover variable dropodown
When click inject the time machine variable "KARTA"
When click the time machine cell edit submit button
When click dashboard cell save button
Then the dashboard variables button is highlighted
When get the current graph of the cell "Semantic"
When click the value dropdown button for variable "KARTA"
Then the selected item of the dropdown for variable "KARTA" is "poppy"
Then the value dropdown for variable "KARTA" contains
"""
daisy,poppy,salvia,zinnia
"""
When click the item "salvia" for variable "KARTA"
Then the graph of the cell "Semantic" has changed
When get the current graph of the cell "Semantic"
Then the selected item of the dropdown for variable "KARTA" is "salvia"
When click the value dropdown button for variable "KARTA"
When click the item "daisy" for variable "KARTA"
Then the cell named "Semantic" has no results
When click the value dropdown button for variable "KARTA"
When click the item "zinnia" for variable "KARTA"
Then the graph of the cell "Semantic" has changed
#Script with Query variables
@error-collateral
Scenario: Add Query variable to script
Then the dashboard variables button is highlighted
When toggle context menu of dashboard cell named "Semantic"
When click cell content popover configure
#When click the cell edit Script Editor button
# Move to end
When send keys "CTRL+END,AUP,AUP,END" to the time machine flux editor
# Send cursor to start of field value
When send keys "ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT" to the time machine flux editor
# Delete field value
When send keys "DEL,DEL,DEL,DEL,DEL,DEL,DEL,DEL" to the time machine flux editor
# Now check then add variable
When click the time machine script editor variables tab
Then the time machine variable popover is not visible
When hover over the time machine variable "POKUS"
Then the time machine variable popover is visible
# TODO - No solution as yet to access popover contents - all action make popover disappear
# No solution as yet to access popover contents - all action make popover disappear
#When hover over the time machine variable "POKUS"
#When click time machine popover variable dropodown
When click inject the time machine variable "POKUS"
When click the time machine cell edit submit button
When click dashboard cell save button
Then the dashboard variables button is highlighted
When get the current graph of the cell "Semantic"
When click the value dropdown button for variable "POKUS"
Then the selected item of the dropdown for variable "POKUS" is "pulse"
Then the value dropdown for variable "POKUS" contains
"""
pulse,sema,wombat,znacka
"""
When click the item "sema" for variable "POKUS"
Then the graph of the cell "Semantic" has changed
When get the current graph of the cell "Semantic"
Then the selected item of the dropdown for variable "POKUS" is "sema"
When click the value dropdown button for variable "POKUS"
When click the item "wombat" for variable "POKUS"
Then the cell named "Semantic" has no results
When click the value dropdown button for variable "POKUS"
When click the item "znacka" for variable "POKUS"
Then the graph of the cell "Semantic" has changed
#Change variables in Dashboard view two cells same variable.
@error-collateral
Scenario: Change variables in Dashboard view - two cells
When click the header add cell button
Then the cell edit overlay is loaded as "Name this Cell"
When name dashboard cell "Syntagma"
When click the cell edit Script Editor button
When set the time machine script editor contents to:
"""
from(bucket: "qa")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "beat")
|> filter(fn: (r) => r["_field"] == v.POKUS)
|> aggregateWindow(every: v.windowPeriod, fn: mean)
"""
When click the time machine cell edit submit button
When click the cell edit save button
When move the cell named "Syntagma" by "{ "dx": "+400", "dy": "-200" }"
When get the current graph of the cell "Semantic"
When get the current graph of the cell "Syntagma"
When click the value dropdown button for variable "POKUS"
When click the item "pulse" for variable "POKUS"
Then the graph of the cell "Semantic" has changed
Then the graph of the cell "Syntagma" has changed
@error-collateral
Scenario: Change variables in Dashboard view - two variables
When toggle context menu of dashboard cell named "Syntagma"
When click cell content popover configure
# Move to end
When send keys "CTRL+END" to the time machine flux editor
# Send cursor to start of field value
When send keys "AUP,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT,ALFT" to the time machine flux editor
# Delete field value
When send keys "DEL,DEL,DEL,DEL,DEL,DEL,DEL,DEL" to the time machine flux editor
# Now check then add variable
When click the time machine script editor variables tab
Then the time machine variable popover is not visible
When click inject the time machine variable "KARTA"
When click the time machine cell edit submit button
When click the cell edit save button
When click dashboard time range dropdown
When get the current graph of the cell "Semantic"
When get the current graph of the cell "Syntagma"
When select dashboard Time Range "24h"
Then the graph of the cell "Semantic" has changed
Then the graph of the cell "Syntagma" has changed
When get the current graph of the cell "Semantic"
When get the current graph of the cell "Syntagma"
When click the value dropdown button for variable "KARTA"
When click the item "daisy" for variable "KARTA"
Then the cell named "Syntagma" has no results
Then the graph of the cell "Semantic" is visible
# following check skipped - seems there is a slight change due to refresh
#Then the graph of the cell "Semantic" has not changed
#Dashboard view show/hide variables.
@error-collateral
Scenario: Toggle Variables in Dashboard
Then the value dropdown for variable "POKUS" is visible
Then the dashboard variables button is highlighted
When click the dashboard variables button
Then the dashboard variables button is not highlighted
Then the value dropdown for variable "POKUS" is not visible
When click the dashboard variables button
Then the value dropdown for variable "POKUS" is visible
Then the dashboard variables button is highlighted
#default variable
# NEED TO CLEAN UP
# Variables cached in localstore can influence other tests
#@tested
# Scenario Outline: Delete Variable
# When click nav menu item "Settings"
# When click the settings tab "Variables"
#When hover over the "Settings" menu item
#When click nav sub menu "Variables"
# When hover over variable card named "<NAME>"
# When click delete menu of variable card named "<NAME>"
# When click delete confirm of variable card named "<NAME>"
# Then the success notification contains "Successfully deleted the variable"
# Then the variable card "<NAME>" is not present
# When close all notifications
# Examples:
# |NAME|
# |APIVAR|
# |KARTA|
# |POKUS|

View File

@ -1,176 +0,0 @@
@feature-dataExplorer
@dataExplorer-dataExplorer
Feature: Data explorer
As a user I want to Create queries in Data Explorer
Scenario: Create a new bucket and add data
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
Then the buckets tab is loaded
When click the Create Bucket button
Then the Create Bucket Popup is loaded
When input the name of the bucket as "bucket_explorer_test"
When click the Create Bucket popup Create button
Then the bucket named "bucket_explorer_test" is in the list
When click add data button for bucket "bucket_explorer_test"
Then the add data popover for the bucket "bucket_explorer_test" is visible
When click bucket card popover item "Line Protocol"
Then the first page of the Line Protocol Wizard is loaded
When click radio button "Enter Manually"
Then the data point text area is visible
When enter "12" datapoints with value named "foo" starting at "-2h" with "fibonacci" data of type "int" and prec "ms"
When click the Line Protocol wizard precision dropdown
When click the line Protocol wizard precision "ms"
#When enter "<any>" into the line protocol text area
#When click the Line Protocol wizard continue button
When click the Line Protocol wizard write button
Then the Line Protocol wizard step status message is "Data Written Successfully"
#When click the Line Protocol wizard finish button
When click the Line Protocol wizard close button
Scenario: Create a simple query
#When click nav menu item "Explorer"
When click on the bucket named "bucket_explorer_test"
Then the Data Explorer page is loaded
When choose bucket named "bucket_explorer_test"
When choose the item "fibonacci" in builder card "1"
When choose the item "foo" in builder card "2"
When choose the item "bucketSteps" in builder card "3"
When click the submit button
Then the time machine graph is shown
Scenario: Hover over graph
When hover over the graph
Then the graph data point infobox is visible
Scenario: Zoom graph horizontal
When get the current graph
When move horizontally to "2/5" of the graph
When drag horizontally to "3/5" of the graph
Then the graph has changed
Scenario: Unzoom graph
When get the current graph
When Click at the point "{"x": "1/2", "y": "1/2"}" of the graph
Then the graph has changed
Scenario: Zoom graph vertical and refresh
When get the current graph
When move vertically to "2/5" of the graph
When drag vertically to "3/5" of the graph
Then the graph has changed
When click the refresh button
Then the graph has changed
Scenario: Turn on the automatic refresh and check the graph changes
When click the refresh button
When get the current graph
When click the automatic refresh - paused
When select the automatic refresh "5s"
When wait "6" seconds
Then the graph has changed
When click the automatic refresh - active
When select the automatic refresh "paused"
Scenario: Create second query with Script Editor
When click the time machine add query button
Then there are "2" time machine query tabs
#When right click on the time machine query tab named "Query 2"
#When click on "edit" in the query tab menu
#When input a new query tab name as "testQueryTab"
When click the Script Editor button
When paste into Script Editor text area
"""
from(bucket: "bucket_explorer_test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "fibonacci")
"""
When click the submit button
Then the time machine graph is shown
Then the graph has changed
Scenario: Change graph view type
When click the graph view type dropdown
When select the graph view type "Graph + Single Stat"
Then the graph view type is Graph plus Single Stat
Scenario: Change the graph time range and view raw data
When click the graph time range dropdown
When select the graph time range "6h"
Then the graph has changed
When click the filter functions input
When click the view raw data toggle
Then the raw data table is visible
Scenario: Use aggregate function
When click the view raw data toggle
Then the time machine graph is shown
When click on the time machine query tab named "Query 1"
#When search for function "mean"
When select the function "mean"
When click the submit button
Then the graph has changed
Scenario: Delete query tab
When right click on the time machine query tab named "Query 2"
When click on "remove" in the query tab menu
Then there are "1" time machine query tabs
Scenario: Save query as a dashboard cell
When click on the Save as button
Then the Save as overlay is visible
When click the Target Dashboard dropdown
When select Create a New Dashboard from the Target Dashboard dropdown
When input the New Dashboard Name "Dashboard Cell Test"
When input the Cell Name "DC Test Name"
When click on the Save as Dashboard Cell button
Then the success notification contains "Created dashboard successfully"
When click nav menu item "dashboards"
Then there is a dashboard card named "Dashboard Cell Test"
When click the dashboard name "Dashboard Cell Test"
Then the cell named "DC Test Name" is visible in the dashboard
Scenario: Save query as a task
When click nav menu item "Explorer"
When click the submit button
When click on the Save as button
When click on tab "Task" in the Save As popup
When input the Task Name "Task Test"
When input the Task Interval "4h"
When input the Task Offset "10"
When click on the Save as Task button
Then the error notification contains "Failed to create new task:"
When input the Task Offset "10m"
When click on the Save as Task button
Then the success notification contains "New task created successfully"
Then there is a task named "Task Test"
Scenario: Save query as a variable
When click nav menu item "Explorer"
When click the submit button
When close all notifications
When click on the Save as button
When click on tab "Variable" in the Save As popup
When input the variable name "Variable Test"
When click on the Save as Variable button
Then the success notification contains "Successfully created new variable:"
When click nav menu item "Settings"
When there is a variable card for "Variable Test"
Scenario: Delete Test Variable
When hover over variable card named "Variable Test"
When click delete menu of variable card named "Variable Test"
When click delete confirm of variable card named "Variable Test"
Then the success notification contains "Successfully deleted the variable"
Then the variable card "Variable Test" is not present
When close all notifications

View File

@ -1,50 +0,0 @@
@feature-homePage
@homePage-homePage
Feature: Home Page
Scenario: logout home page
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When open page "HOME" for user "DEFAULT"
When click logout from the home page
Then the sign in page is loaded
When UI sign in user "DEFAULT"
Then the home page is loaded
Scenario: Click Data Collector Panel
When I click the panel "Data Collector"
Then the Telegraf Tab is loaded
@tested
Scenario: Check Dashboards Panel
When hover over the "home" menu item
When click nav menu item "home"
When I click the panel "Dashboard"
Then the Dashboards page is loaded
When click create dashboard control
When click "New Dashboard" in create dashboard dropdown
When name dashboard "Test Dashboard"
When hover over the "home" menu item
When click nav menu item "home"
Then the dashboards panel contains a link to "Test Dashboard"
When click the dashboard link to "Test Dashboard"
Then the dashboard named "Test Dashboard" is loaded
@tested
Scenario: Click Alerting Panel
When hover over the "home" menu item
When click nav menu item "home"
When I click the panel "Alerting"
Then the Alerting page is loaded
Scenario: Logout from Menu
When hover over the "home" menu item
When click nav menu item "home"
When click logout from the home page
Then the sign in page is loaded
When UI sign in user "DEFAULT"

View File

@ -1,99 +0,0 @@
@feature-influx
@influx-influx
Feature: Influx common
Click through the controls common to all influx pages
@tested
Scenario: Open home page
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When open page "HOME" for user "DEFAULT"
Then influx page is loaded
#Then the header contains the org name "DEFAULT"
Then the home page header contains "Getting Started"
@tested
Scenario: Click Data Explorer
#Then the menu item text "Data Explorer" is "hidden"
#When hover over the "explorer" menu item
#Then the menu item text "Data Explorer" is "visible"
When click nav menu item "Explorer"
Then the Data Explorer page is loaded
@tested
Scenario: Click Dashboards
#Then the menu item text "Dashboards" is "hidden"
#When hover over the "dashboards" menu item
#Then the menu item text "Dashboards" is "visible"
When click nav menu item "Dashboards"
Then the Dashboards page is loaded
@tested
Scenario: Click Tasks
#Then the menu item text "Tasks" is "hidden"
#When hover over the "tasks" menu item
#Then the menu item text "Tasks" is "visible"
When click nav menu item "Tasks"
Then the Tasks page is loaded
@tested
Scenario: Click Alerting
#Then the menu item text "Monitoring & Alerting" is "hidden"
#When hover over the "alerting" menu item
#Then the menu item text "Monitoring & Alerting" is "visible"
When click nav menu item "Alerting"
Then the Alerting page is loaded
@tested
Scenario: Click Load Data
#Then the menu item text "Settings" is "hidden"
#When hover over the "loadData" menu item
#Then the menu item text "Load Data" is "visible"
#Then the menu item text "Buckets" is "visible"
#Then the menu item text "Telegraf" is "visible"
#Then the menu item text "Scrapers" is "visible"
When click nav menu item "LoadData"
Then the buckets tab is loaded
Scenario: Click Settings
#Then the menu item text "Settings" is "hidden"
#When hover over the "settings" menu item
#Then the menu item text "Settings" is "visible"
When click nav menu item "Settings"
Then the Settings page is loaded
# Item no longer exists commit=bd91a81123 build_date=2020-04-07T07:57:22Z
#Scenario: Hover Feedback
# Then the menu item text "Feedback" is "hidden"
# When hover over the "feedback" menu item
# Then the menu item text "Feedback" is "visible"
# Then the feedback URL should include "https://docs.google.com/forms"
Scenario: Click home item
#Then the home submenu items are "hidden"
#When hover over the "home" menu item
#Then the home submenu items are "visible"
#When click nav sub menu "Create Organization"
#Then the Create Organization form is loaded
#When open page "HOME" for user "DEFAULT"
#When hover over the "home" menu item
When click nav menu item "home"
Then the home page is loaded
#Then the sign in page is loaded
#When UI sign in user "DEFAULT"
# This appears to have been removed 2020-05-12
# See closed issue #17991
# Scenario: Click Organization
# When click nav menu item "Organization"
# Then the Organization page is loaded
Scenario: Click User
When click nav menu item "User"
Then the user menu items are "visible"
# TODO - create organization from Home Menu Item

View File

@ -1,276 +0,0 @@
@feature-loadData
@loadData-buckets
Feature: Load Data - Buckets
As a user I want to Read Create Update and Delete Buckets
So that I can manage the stores used with Influxdbv2
@tested
Scenario: List Initial Buckets
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
When click load data tab "Buckets"
Then the buckets tab is loaded
Then the buckets are sorted as "_monitoring,_tasks,DEFAULT"
@tested
Scenario: Exercise Create Bucket Dialog
When click the Create Bucket button
Then the Create Bucket Popup is loaded
Then the Create button of Create Bucket Popup is disabled
Then the Retention Policy radio button "never" is active
Then the Retention Policy intervals controls are not present
When click the Retention Policy "intervals" button
Then the Retention Policy radio button "intervals" is active
Then the Retention Policy radio button "never" is inactive
Then the Retention Policy intervals controls are present
# N.B. controls replaced with dropdown selector 2019-09-11
#Then the Retention Policy warning message contains "Retention period must be at least an hour"
#When enter "61" into the Retention Policy "Seconds" control
#Then the Retention Policy "Seconds" control contains the value "1"
#Then the Retention Policy "Minutes" control contains the value "1"
#Then the Retention Policy warning message contains "Retention period must be at least an hour"
#When clear all Retention Policy interval controls
#When enter "123" into the Retention Policy "Minutes" control
#Then the Retention Policy "Minutes" control contains the value "3"
#Then the Retention Policy "Hours" control contains the value "2"
#Then the Retention Policy warning message has disappeared
#When clear all Retention Policy interval controls
#When enter "80" into the Retention Policy "Hours" control
#Then the Retention Policy "Hours" control contains the value "8"
#Then the Retention Policy "Days" control contains the value "3"
#When clear all Retention Policy interval controls
#When enter "7" into the Retention Policy "Days" control
#Then the Retention Policy "Days" control contains the value "7"
#When clear all Retention Policy interval controls
#When enter "ABCD" into the Retention Policy "Seconds" control
#Then the Retention Policy "Seconds" control contains the value "0"
#When enter "ABCD" into the Retention Policy "Minutes" control
#Then the Retention Policy "Minutes" control contains the value "0"
#When enter "ABCD" into the Retention Policy "Hours" control
#Then the Retention Policy "Hours" control contains the value "0"
#When enter "ABCD" into the Retention Policy "Days" control
#Then the Retention Policy "Days" control contains the value "0"
When input the name of the bucket as "ABCD"
#Then the Retention Policy warning message contains "Retention period must be at least an hour"
When click the Retention Policy "never" button
#Then the Retention Policy warning message has disappeared
Then the Create button of Create Bucket Popup is enabled
When dismiss the Create Bucket Popup
Then the Create Bucket Popup is not present
When click the Create Bucket button
Then the Create Bucket Popup is loaded
Then the Create button of Create Bucket Popup is disabled
When cancel the Create Bucket Popup
Then the Create Bucket Popup is not present
@tested
Scenario Outline: Create Buckets with Retention Policies
When click the Create Bucket button
When input the name of the bucket as "<NAME>"
When set the retention policy of the bucket as "<RETENTION>"
When click the Create Bucket popup Create button
Then the bucket named "<NAME>" is in the list
Then the bucket named "<NAME>" has a Retention Policy of "<RETENTION>"
Examples:
|NAME| RETENTION |
| Trvalá | Never |
| Měsíční | 30d |
| Týdenní | 7d |
| Denní | 24h |
| Půldenní | 12h |
| Hodinová | 1h |
| Oprava | 24h |
@tested
Scenario: Modify Retention Policy
When click on settings for bucket named "Oprava"
Then the Edit Bucket popup is loaded
Then the name edit textbox of the Edit Bucket popup is disabled
Then the form help text contains "To rename bucket use the RENAME button below"
When dismiss the Edit Bucket Popup
Then the Edit Bucket Popup is not present
When click on settings for bucket named "Oprava"
Then the Edit Bucket popup is loaded
When cancel the Edit Bucket Popup
Then the Edit Bucket Popup is not present
When click on settings for bucket named "Oprava"
When set the retention policy of the bucket as "48h"
When click Edit Bucket Popup Save Changes
# N.B. fix following once issue 14905 is resolved
Then the bucket named "Oprava" has a Retention Policy of "48h"
@tested
Scenario: Filter Buckets
When enter "denn" in the Buckets filter field
Then the buckets are sorted as "Denní,Půldenní,Týdenní"
Then the bucket "Oprava" is not in the list
@error-collateral
Scenario: Clear Filter
When clear the Buckets filter field
Then the bucket named "Oprava" is in the list
Then the bucket named "_monitoring" is in the list
Then the bucket named "_tasks" is in the list
Then the bucket named "Týdenní" is in the list
@tested
Scenario: Sort Buckets by Name
When click the sort type dropdown
When click sort by item "Name Desc"
#Given ensure buckets name sort order "desc"
Then the buckets are sorted as "_monitoring,_tasks,Denní,Hodinová,Měsíční,Oprava,Půldenní,DEFAULT,Trvalá,Týdenní"
When click the sort type dropdown
When click sort by item "Name Asc"
# Given ensure buckets name sort order "asc"
Then the buckets are sorted as "Týdenní,Trvalá,DEFAULT,Půldenní,Oprava,Měsíční,Hodinová,Denní,_tasks,_monitoring"
When click the sort type dropdown
When click sort by item "Name Desc"
#Given ensure buckets name sort order "desc"
@error-collateral
Scenario: Sort Buckets by Retention Policy
When click the sort type dropdown
When click sort by item "retentionRules[0].everySeconds-asc"
#When click buckets sort by retention policy
Then the buckets are sorted as "Hodinová,Půldenní,Denní,Oprava,_tasks,Týdenní,_monitoring,Měsíční,Trvalá,DEFAULT"
When click the sort type dropdown
When click sort by item "retentionRules[0].everySeconds-desc"
#When click buckets sort by retention policy
Then the buckets are sorted as "DEFAULT,Trvalá,Měsíční,Týdenní,_monitoring,_tasks,Oprava,Denní,Půldenní,Hodinová"
@tested
Scenario Outline: Delete Buckets
# following check leads to troublesome false positives - todo fix it
# Then the delete button of the card named "<Name>" is not present
When hover over bucket card named "<Name>"
When click the delete button of the card named "<Name>"
When click the confirm delete button of the card named "<Name>"
Then the bucket card named "<Name>" is not in the list
Examples:
| Name |
| Trvalá |
| Měsíční |
| Týdenní |
| Denní |
| Půldenní |
| Hodinová |
| Oprava |
@tested
Scenario: Add Manual Line Protocol Data to Default
Then the add data popover is not present
When click add data button for bucket "DEFAULT"
Then the add data popover for the bucket "DEFAULT" is visible
When click bucket card popover item "Line Protocol"
Then the first page of the Line Protocol Wizard is loaded
When click radio button "Enter Manually"
Then the data point text area is visible
When click the Line Protocol wizard precision dropdown
When click the line Protocol wizard precision "ms"
When enter "12" datapoints with value named "foo" starting at "-2h" with "fibonacci" data of type "int" and prec "ms"
When click the Line Protocol wizard write button
Then the line Protocol wizard second step opens
Then the Line Protocol wizard step status message is "Data Written Successfully"
When click the Line Protocol wizard close button
Then the line Protocol wizard is not present
When API sign in user "DEFAULT"
Then the bucket "DEFAULT" for user "DEFAULT" contains:
"""
{ "points": 12, "field": "foo", "measurement": "fibonacci", "start": "-3h", "vals": [1,233], "rows": ["0","-1"] }
"""
@error-collateral
Scenario: Add Manual Line Protocol Bad Data to Default
Then the add data popover is not present
When click add data button for bucket "DEFAULT"
Then the add data popover for the bucket "DEFAULT" is visible
When click bucket card popover item "Line Protocol"
Then the first page of the Line Protocol Wizard is loaded
When click radio button "Enter Manually"
Then the data point text area is visible
When enter "bad data" into the line protocol text area
When click the Line Protocol wizard write button
Then the line Protocol wizard second step opens
Then the Line Protocol wizard step status message contains "Unable to Write Data"
When click the Line Protocol wizard cancel button
Then the data point text area is visible
When click the Line Protocol wizard close icon
Then the line Protocol wizard is not present
@tested
Scenario: Add Line Protocol Data from File to Default
When generate a line protocol testdata file "etc/test-data/line-protocol-hydro.txt" based on:
"""
{ "points": 20, "measurement":"level", "start": "-60h", "algo": "hydro", "prec": "sec", "name": "hydro"}
"""
When click add data button for bucket "DEFAULT"
Then the add data popover for the bucket "DEFAULT" is visible
When click bucket card popover item "Line Protocol"
Then the first page of the Line Protocol Wizard is loaded
When click radio button "Upload File"
When add the file "etc/test-data/line-protocol-bogus.txt" to the Line Protocol Wizard file upload
Then the popup wizard import file header contains "line-protocol-bogus.txt"
When click the Line Protocol wizard write button
#When click the Line Protocol wizard continue button
Then the popup wizard step state text contains "Unable to Write Data"
# appears error class no longer being used 13.8.20
#Then the popup wizard step is in state "error"
When click the Line Protocol wizard cancel button
#When click the bucket data wizard previous button
When click the Line Protocol wizard precision dropdown
When click the line Protocol wizard precision "ms"
When add the file "etc/test-data/line-protocol-hydro.txt" to the Line Protocol Wizard file upload
Then the popup wizard import file header contains "line-protocol-hydro.txt"
When click the Line Protocol wizard write button
#When click the Line Protocol wizard continue button
Then the popup wizard step state text contains "Data Written Successfully"
# Success class no longer used 13.8.20
#Then the popup wizard step is in state "success"
When click the Line Protocol wizard close button
Then the line Protocol wizard is not present
#Then the bucket "DEFAULT" for user "DEFAULT" contains "20" datapoints of "hydro" data with value named "level" starting at "-60h"
Then the bucket "DEFAULT" for user "DEFAULT" contains:
"""
{ "points": 20, "field": "level", "measurement": "hydro", "start": "-72h", "vals": "skip", "rows": ["0","-1"], "name": "hydro" }
"""
@tested
Scenario: Add Scraper to Default
When click add data button for bucket "DEFAULT"
Then the add data popover for the bucket "DEFAULT" is visible
When click bucket card popover item "Scrape Metrics"
When enter the name "Courbet" into the Create Scraper popup name input
When click the create scraper create button
Then the success notification contains "Scraper was created successfully"
When click load data tab "Scrapers"
Then there is a scraper card for "Courbet"
Scenario: Add Telegraf to Default
When click nav menu item "LoadData"
When click load data tab "Buckets"
When click add data button for bucket "DEFAULT"
Then the add data popover for the bucket "DEFAULT" is visible
When click bucket card popover item "Configure Telegraf Agent"
Then the Create Telegraf Config Wizard is loaded
When click the buckets dropdown button
When select the buckets dropdown item "DEFAULT"
When select the telegraf plugin tile "System"
When click the Popup Wizard continue button
When enter the telegraf name "Daumier"
When click the Popup Wizard continue button
Then the success notification contains "telegraf plugin: system."
Then the success notification contains "configurations have been saved"
When close all notifications
When click the Popup Wizard continue button
When click load data tab "Telegrafs"
Then there is a telegraf card for "Daumier"
#TODO - new functionality - click bucket name opens data explorerer

View File

@ -1,52 +0,0 @@
@feature-loadData
@loadData-clientlib
Feature: Load Data - Client Libs
As a user I want to Read Create Update and Delete Client Libraries
So that I can manage the stores used with Influxdbv2
Scenario: Load Initial Client Lib Tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When API sign in user "DEFAULT"
When API create a bucket named "Duchamp" for user "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
When click load data tab "Client Libraries"
Then the Client Libraries tab is loaded
Scenario: Open C# Popup
When click the "csharp" client library tile
Then the csharp info popup is loaded
Then click copy "Package Manager" to clipboard
Then the success notification contains "has been copied to clipboard"
#Then verify clipboard contains text of "Package Manager"
When close all notifications
Then verify the github repository link contains "influxdb-client-csharp"
Then dismiss the popup
Scenario: Open Go Popup
When click the "go" client library tile
Then the go info popup is loaded
Then verify the github repository link contains "influxdb-client-go"
Then dismiss the popup
Scenario: Open Java Popup
When click the "java" client library tile
Then the java info popup is loaded
Then verify the github repository link contains "influxdb-client-java"
Then dismiss the popup
Scenario: Open Node Popup
When click the "javascript-node" client library tile
Then the node info popup is loaded
Then verify the github repository link contains "influxdb-client-js"
Then dismiss the popup
Scenario: Open Python Popup
When click the "python" client library tile
Then the python info popup is loaded
Then verify the github repository link contains "influxdb-client-python"
Then dismiss the popup
# TODO - check copy to clipboard buttons - N.B. clipboard not available in chromedriver headless

View File

@ -1,21 +0,0 @@
@feature-loadData
@loadData-loadData
Feature: Load Data - Base
As a user I want to open the Load Data page
So that I can explore how data is being loaded into Influxdbv2
@tested
Scenario: Verify Tabs
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When open page "load-data" for user "DEFAULT"
When click load data tab "Buckets"
Then the buckets tab is loaded
When click load data tab "Telegrafs"
Then the Telegraf Tab is loaded
When click load data tab "Scrapers"
Then the Scrapers Tab is loaded
When click load data tab "Tokens"
Then the tokens tab is loaded

View File

@ -1,156 +0,0 @@
@feature-loadData
@loadData-scrapers
Feature: Load Data - Scrapers
As a user I want to Read Create Update and Delete Scrapers
So that I can manage the stores used with Influxdbv2
# Move exercise create scraper popup here
# N.B. can verify scrapers at endpoint http://localhost:8086/api/v2/scrapers
@tested
Scenario: Load Initial Scrapers tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When API sign in user "DEFAULT"
When API create a bucket named "Duchamp" for user "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
When click load data tab "Scrapers"
Then the scrapers tab is loaded
@tested
Scenario: Exercise create Scraper popup
When click the create scraper button empty
Then the Create Scraper popup is loaded
When dismiss the Create Scraper popup
Then the Create Scraper popup is no longer present
When click the create scraper button from the header
Then the Create Scraper popup is loaded
When cancel the Create Scraper popup
Then the Create Scraper popup is no longer present
When click the create scraper button empty
Then the Create Scraper popup is loaded
When clear the Scraper Popup name input
Then the form element error message is "Name cannot be empty"
Then a form input error icon is shown
Then the Create Scrapper popup create button is disabled
When enter the name "Mumford" into the Create Scraper popup name input
Then the form element error message is not shown
Then no form input error icon is shown
Then the Create Scrapper popup create button is enabled
When click the Create Scrapper buckets dropdown
Then an item for the bucket "DEFAULT" is an item in the buckets dropdown
Then an item for the bucket "Duchamp" is an item in the buckets dropdown
When click the Create Scrapper buckets dropdown
Then NO items in the buckets dropdown are shown
When clear Scraper Popup the Target Url input
Then the form element error message is "Target URL cannot be empty"
Then a form input error icon is shown
Then the Create Scrapper popup create button is disabled
When enter the value "http://localhost:8086/metrics" into the Create Scraper popup url input
Then the form element error message is not shown
Then no form input error icon is shown
Then the Create Scrapper popup create button is enabled
When dismiss the Create Scraper popup
Then the Create Scraper popup is no longer present
@tested
Scenario Outline: Create Scrapers
When click the create scraper button from the header
When clear the Scraper Popup name input
When enter the name "<NAME>" into the Create Scraper popup name input
When click the Create Scrapper buckets dropdown
When select the Scrapper buckets dropdown item "<BUCKET>"
When clear Scraper Popup the Target Url input
When enter the value "<ENDPOINT>" into the Create Scraper popup url input
When click the create scraper create button
Then the success notification contains "Scraper was created successfully"
When close all notifications
Then the create scraper button empty is no longer present
Then there is a scraper card for "<NAME>"
Then the scraper card named "<NAME>" has the bucket "<BUCKET>"
Then the scraper card named "<NAME>" has the endpoint "<ENDPOINT>"
Examples:
| NAME | ENDPOINT | BUCKET |
| Melnik | http://localhost:8086/metrics | DEFAULT |
| Morlaix | http://localhost:8086/metrics | Duchamp |
| Brno | http://localhost:10018/bogus | DEFAULT |
| Brest | http://localhost:10018/bogus | Duchamp |
@error-collateral
Scenario: Filter Scrapers
Then the scraper name sort order is "Brest,Brno,Melnik,Morlaix"
When enter the value "Br" into the scraper filter
Then the scraper name sort order is "Brest,Brno"
Then the scraper card "Melnik" is no longer present in the list
Then the scraper card "Morlaix" is no longer present in the list
When clear the scraper filter
Then the scraper name sort order is "Brest,Brno,Melnik,Morlaix"
@error-collateral
Scenario: Sort Scrapers by Name
When click the sort type dropdown
When click sort by item "Name Desc"
#When click the scraper sort by name button
Then the scraper name sort order is "Morlaix,Melnik,Brno,Brest"
When click the sort type dropdown
When click sort by item "Name Asc"
#When click the scraper sort by name button
Then the scraper name sort order is "Brest,Brno,Melnik,Morlaix"
@error-collateral
Scenario: Sort Scrapers by URL
When click the sort type dropdown
When click sort by item "URL Asc"
#When click the scraper sort By URL button
Then the scraper name sort order is "Brno,Brest,Melnik,Morlaix"
When click the sort type dropdown
When click sort by item "URL Desc"
#When click the scraper sort By URL button
Then the scraper name sort order is "Melnik,Morlaix,Brno,Brest"
@error-collateral
Scenario: Sort Scrapers by Bucket
When click the sort type dropdown
When click sort by item "Bucket Asc"
#When click the scraper sort By Bucket button
Then the scraper name sort order is "Morlaix,Brest,Melnik,Brno"
When click the sort type dropdown
When click sort by item "Bucket Desc"
#When click the scraper sort By Bucket button
Then the scraper name sort order is "Melnik,Brno,Morlaix,Brest"
@error-collateral
Scenario: Rename Scraper
When hover over the scraper card name "Brno"
When click the scraper card name edit control for the card "Brno"
When Enter the value "Plzeň" for the card "Brno"
Then the success notification contains "Scraper "Plzeň" was updated successfully"
Then there is a scraper card for "Plzeň"
Then the scraper card "Brno" is no longer present in the list
@error-collateral
Scenario Outline: Verify Scraper data
Then the named query "<NAMED_QUERY>" by user "<USER>" on the bucket "<BUCKET>" contains the values "<EXPECTED_VALUES>"
Examples:
|USER|BUCKET|NAMED_QUERY|EXPECTED_VALUES|
|DEFAULT| Duchamp | Measurements | boltdb_reads_total,go_info,go_threads,influxdb_info,storage_reads_seeks |
|DEFAULT| DEFAULT | Measurements | boltdb_reads_total,go_info,go_threads,influxdb_info,storage_reads_seeks |
@tested
Scenario Outline: Delete Scraper
Then the delete button of the scraper card named "<NAME>" is not present
When hover over scraper card named "<NAME>"
When click the delete button of the scraper card named "<NAME>"
When click the confirm delete button of the scraper card named "<NAME>"
Then the scraper card "<NAME>" is no longer present in the list
Examples:
| NAME |
| Melnik |
| Morlaix |
| Plzeň |
| Brest |

View File

@ -1,226 +0,0 @@
@feature-loadData
@loadData-telegrafs
Feature: Load Data - Telegrafs
Scenario: Load Initial Telegraf tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When API sign in user "DEFAULT"
When API create a bucket named "Duchamp" for user "DEFAULT"
When API create a label "Cesko" described as "Pravda vitezi" with color "#AAFFAA" for user "DEFAULT"
When API create a label "Mesto" described as "Matka mest" with color "#FFAAAA" for user "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
When click load data tab "Telegrafs"
Then the telegrafs tab is loaded
Scenario: Exercise create Telegraf wizard
When click the create Telegraf button empty
Then the Create Telegraf Wizard is loaded
When dismiss the Create Telegraf Wizard
Then the Create Telegraf Wizard is no longer present
When click the create Telegraf button in header
When click the select bucket dropdown in the Create Telegraf Wizard
When click the bucket item "DEFAULT" in the Create Telegraf Wizard
When enter the value "NGI" in create Telegraf Wizard filter plugins
Then the Create Telegraf wizard plugin tile "NGINX" is visible
Then the Create Telegraf wizard plugin tile "System" is not present
Then the Create Telegraf wizard plugin tile "Redis" is not present
Then the Create Telegraf wizard plugin tile "Docker" is not present
When clear the create Telegraf Wizard plugin filter
When click the plugin tile "System" in the Create Telegraf Wizard
When click the Popup Wizard continue button
Then the create Telegraf Wizard second step is loaded
Then the create Telegraf plugins sidebar contains "cpu,disk,diskio,mem,net,processes,swap,system"
Then the create Telegraf plugin sidebar "system" item is in state "success"
Then the create Telegraf plugin sidebar "cpu" item is in state "success"
Then the create Telegraf plugin sidebar "mem" item is in state "success"
When dismiss the Create Telegraf Wizard
Then the Create Telegraf Wizard is no longer present
When click the create Telegraf button empty
Scenario Outline: Edit Plugin Values
When click the plugin tile "<PLUGIN>" in the Create Telegraf Wizard
When click the Popup Wizard continue button
Then the create Telegraf Wizard second step is loaded
Then the create Telegraf plugins sidebar contains "<PLUGIN>"
Then the create Telegraf plugin sidebar "<PLUGIN>" item is in state "neutral"
When click the create Telegraf plugin sidebar "<PLUGIN>" item
Then the create Telegraf edit plugin "<PLUGIN>" step is loaded
# When click the Popup Wizard done button
# Then the create Telegraf plugin sidebar "<PLUGIN>" item is in state "error"
# When click the create Telegraf plugin sidebar "<PLUGIN>" item
When enter the values <FAKE_VALUES> into the fields <FIELDS>
Then verify the edit plugin error notification with message "<ERRMSGS>"
When clear the create Telegraf edit plugin fields <FIELDS>
When enter the values <TRUE_VALUES> into the fields <FIELDS>
When click the Popup Wizard done button
Then the create Telegraf plugin sidebar "<PLUGIN>" item is in state "success"
When click the wizard previous button
Then the Create Telegraf Wizard is loaded
Then the Create Telegraf wizard plugin tile "<PLUGIN>" is selected
When click the plugin tile "<PLUGIN>" in the Create Telegraf Wizard
Then the Create Telegraf wizard plugin tile "<PLUGIN>" is not selected
Then the popup wizard continue button is disabled
Examples:
| PLUGIN | FAKE_VALUES | FIELDS | ERRMSGS | TRUE_VALUES |
| Docker | SKIP | endpoint | SKIP | http://localhost:10080 |
| Kubernetes | ASDF | url | Must be a valid URI. | http://localhost:10080 |
| Redis | SKIP,SKIP | servers,password | SKIP | tcp://localhost:6379,wumpus |
Scenario: Edit NGINX Plugin Values
When click the plugin tile "NGINX" in the Create Telegraf Wizard
When click the Popup Wizard continue button
Then the create Telegraf Wizard second step is loaded
Then the create Telegraf plugins sidebar contains "NGINX"
Then the create Telegraf plugin sidebar "NGINX" item is in state "neutral"
When click the create Telegraf plugin sidebar "NGINX" item
Then the create Telegraf edit plugin "NGINX" step is loaded
When enter the values ASDF into the fields urls
Then verify the edit plugin error notification with message "NONE"
When clear the create Telegraf edit plugin fields urls
When enter the values http://localhost:10080 into the fields urls
When click the NGINX configuration add button
Then the NGINX configuration URLs list contains "1" items
When click delete for the first NGINX configuration URL
When click confirm delete of NGINX configuration URL
Then the NGINX configuration URLs list is empty
When click the Popup Wizard done button
Then the create Telegraf plugin sidebar "NGINX" item is in state "error"
When click the create Telegraf plugin sidebar "NGINX" item
When enter the values http://localhost:10080 into the fields urls
When click the NGINX configuration add button
When click the Popup Wizard done button
Then the create Telegraf plugin sidebar "NGINX" item is in state "success"
When click the wizard previous button
Then the Create Telegraf Wizard is loaded
Then the Create Telegraf wizard plugin tile "NGINX" is selected
When click the plugin tile "NGINX" in the Create Telegraf Wizard
Then the Create Telegraf wizard plugin tile "NGINX" is not selected
Then the popup wizard continue button is disabled
Scenario: Cleanup from Edit Plugin Values
When dismiss the Create Telegraf Wizard
#N.B. just add UI artifacts - no need to check backend at this point
Scenario Outline: Create Telegraf
When click the create Telegraf button in header
When click the select bucket dropdown in the Create Telegraf Wizard
When click the bucket item "<BUCKET>" in the Create Telegraf Wizard
When click the plugin tile "<PLUGIN>" in the Create Telegraf Wizard
When click the Popup Wizard continue button
When enter the name "<NAME>" in the Create Telegraf Wizard
When enter the description "<DESCR>" in the Create Telegraf Wizard
When click the Popup Wizard continue button
Then the success notification contains "<SUCCESS_MSG>"
Then the success notification contains "Your configurations have been saved"
When close all notifications
Then the create Telegraf Wizard final step is loaded
When click the Create Telegraf Wizard finish button
Then there is a telegraf card for "<NAME>"
Then the bucket of the telegraf card "<NAME>" is "<BUCKET>"
Examples:
| PLUGIN | BUCKET | NAME | DESCR | SUCCESS_MSG |
| System | DEFAULT |Strakonice | Lorem ipsum | Successfully created dashboards for telegraf plugin: system. |
| Docker | Duchamp |Decin | Lorem ipsum | SKIP |
| Kubernetes | DEFAULT |Kladno | Lorem ipsum | SKIP |
| NGINX | Duchamp |Nymburk | Lorem ipsum | SKIP |
| Redis | DEFAULT |Rakovnik | Lorem ipsum | SKIP |
Scenario: Sort Telegrafs by Name
Then the telegraf sort order is "Decin,Kladno,Nymburk,Rakovnik,Strakonice"
When click the sort type dropdown
When click sort by item "Name Desc"
#When click the telegraf sort by name button
Then the telegraf sort order is "Strakonice,Rakovnik,Nymburk,Kladno,Decin"
When click the sort type dropdown
When click sort by item "Name Asc"
#When click the telegraf sort by name button
Then the telegraf sort order is "Decin,Kladno,Nymburk,Rakovnik,Strakonice"
Scenario: Filter Telegrafs
When enter the value "Rak" into the Telegrafs filter
Then the telegraf sort order is "Rakovnik,Strakonice"
Then the telegraf cards "Decin,Kldano,Nymburk" are no longer present
When clear the Telegrafs filter
Then the telegraf sort order is "Decin,Kladno,Nymburk,Rakovnik,Strakonice"
Scenario: Verify setup instructions
When click on setup instructions for the telegraf card "Decin"
Then the telegraf setup instruction popup is loaded
When dismiss the popup
Then popup is not loaded
Scenario: Verify configuration
When click on the name of the telegraf card "Nymburk"
Then the telegraf configuration popup for "Nymburk" is loaded
When dismiss the popup
Then popup is not loaded
Scenario: Edit Telegraf Card
When hover over the name of the telegraf card "Nymburk"
When click the name edit icon of the telegraf card "Nymburk"
When clear the name input of the telegraf card "Nymburk"
When set the name input of the telegraf card "Nymburk" to "Norimberk"
Then the Telegraf Card "Nymburk" can no longer be found
Then there is a telegraf card for "Norimberk"
When hover over the description of the telegraf Card "Norimberk"
When click the description edit icon of the telegraf card "Norimberk"
When clear the desrciption input of the telegraf card "Norimberk"
When set the description input of the telegraf card "Norimberk" to "Hunt the Wumpus"
Then the description of the telegraf card "Norimberk" is "Hunt the Wumpus"
Scenario: Add labels to telegraf
Then the Label Popup for the Telegraf Card "Kladno" is not present
When click Add Label for Telegraf Card "Kladno"
Then the Label Popup for the Telegraf Card "Kladno" is visible
Then the item "Cesko" is in the Telegraf Card "Kladno" label select list
Then the item "Mesto" is in the Telegraf Card "Kladno" label select list
When filter the Telegraf Card "Kladno" label list with "Ce"
Then the item "Cesko" is in the Telegraf Card "Kladno" label select list
Then the item "Mesto" is NOT in the Telegraf Card "Kladno" label select list
When clear the label filter of the Telegraf Card "Kladno"
Then the item "Mesto" is in the Telegraf Card "Kladno" label select list
When click the item "Cesko" is in the Telegraf Card "Kladno" label select list
Then there is a label pill "Cesko" for the Telegraf Card "Kladno"
Then the item "Cesko" is NOT in the Telegraf Card "Kladno" label select list
When click the item "Mesto" is in the Telegraf Card "Kladno" label select list
Then there is a label pill "Mesto" for the Telegraf Card "Kladno"
Then the item "Mesto" is NOT in the Telegraf Card "Kladno" label select list
Then the label select list for "Kladno" shows the empty state message
When enter the value "Lidstvo" into the Telegraf Card "Kladno" label filter
Then the create Label popup is loaded
When dismiss the popup
Then popup is not loaded
Scenario: Delete label from telegraf
When hover over the label pill "Cesko" for the Telegraf Card "Kladno"
When click delete the label pill "Cesko" for the Telegraf Card "Kladno"
Then the label pill "Cesko" for the Telegraf Card "Kladno" is NOT present
When click Add Label for Telegraf Card "Kladno"
# Affected by issue 16528
Then the item "Cesko" is in the Telegraf Card "Kladno" label select list
# lose focus
When click telegraf card "Kladno"
Then the Label Popup for the Telegraf Card "Kladno" is not present
Scenario Outline: Delete Telegraf Card
When hover over telegraf card "<NAME>"
When click delete for telegraf card "<NAME>"
When click delete confirm for telegraf card "<NAME>"
Then the Telegraf Card "<NAME>" can no longer be found
Examples:
|NAME|
|Decin|
|Strakonice|
|Kladno |
|Norimberk |
|Rakovnik |
# N.B. can verify telegrafs at endpoint http://localhost:8086/api/v2/telegrafs
# TODO - Test installation of telegraf and instructions - check back end

View File

@ -1,183 +0,0 @@
@feature-loadData
@loadData-tokens
Feature: Load Data - Tokens
@tested
Scenario: Load Initial Tokens tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When API sign in user "DEFAULT"
When API create a bucket named "Duchamp" for user "DEFAULT"
When API create a bucket named "Courbet" for user "DEFAULT"
When API create a bucket named "Corot" for user "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "LoadData"
When click load data tab "Tokens"
Then the tokens tab is loaded
Then the tokens list contains the token described as "admin's Token"
@tested
Scenario: Exercise Create Read/Write Token Popup
When click the generate token dropdown
When click the generate token item "read-write"
Then the generate read-write token popup is loaded
When click the "Read" radio button "All Buckets"
Then the "Read" panel shows the empty state text
Then the bucket selector for the "Read" panel is not present
When click the "Write" radio button "All Buckets"
Then the "Write" panel shows the empty state text
Then the bucket selector for the "Write" panel is not present
When click the "Read" radio button "Scoped"
Then the "Read" panel empty state text is not present
Then the "Read" panel bucket selector is present
When click the "Write" radio button "Scoped"
Then the "Write" panel empty state text is not present
Then the "Write" panel bucket selector is present
Then the "Read" panel bucket list contains "DEFAULT,Corot,Courbet,Duchamp"
Then the "Write" panel bucket list contains "DEFAULT,Corot,Courbet,Duchamp"
When filter the "Read" panel bucket selector with "Co"
Then the "Read" panel bucket list contains "Corot,Courbet"
Then the "Read" panel bucket list does not contain "DEFAULT,Duchamp"
When clear the "Read" panel bucket selector
Then the "Read" panel bucket list contains "DEFAULT,Corot,Courbet,Duchamp"
When filter the "Write" panel bucket selector with "Co"
Then the "Write" panel bucket list contains "Corot,Courbet"
Then the "Write" panel bucket list does not contain "DEFAULT,Duchamp"
When clear the "Write" panel bucket selector
Then the "Write" panel bucket list contains "DEFAULT,Corot,Courbet,Duchamp"
When click "Read" panel select all buckets
Then the "Read" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are selected
When click "Read" panel deselect all buckets
Then the "Read" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are not selected
When click the "Read" panel bucket "Courbet"
Then the "Read" panel buckets "Courbet" are selected
Then the "Read" panel buckets "DEFAULT,Corot,Duchamp" are not selected
When click the "Read" panel bucket "Courbet"
Then the "Read" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are not selected
When click "Write" panel select all buckets
Then the "Write" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are selected
When click "Write" panel deselect all buckets
Then the "Write" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are not selected
When click the "Write" panel bucket "Courbet"
Then the "Write" panel buckets "Courbet" are selected
Then the "Write" panel buckets "DEFAULT,Corot,Duchamp" are not selected
When click the "Write" panel bucket "Courbet"
Then the "Write" panel buckets "DEFAULT,Corot,Courbet,Duchamp" are not selected
When dismiss the popup
Then popup is not loaded
When click the generate token dropdown
When click the generate token item "read-write"
Then the generate read-write token popup is loaded
When click popup cancel button
Then popup is not loaded
@error-collateral
Scenario: Exercise Create All Access Token Popup
When click the generate token dropdown
When click the generate token item "all-access"
Then the generate all-access token popup is loaded
When dismiss the popup
Then popup is not loaded
When click the generate token dropdown
When click the generate token item "all-access"
When click all-access token popup cancel
Then popup is not loaded
@tested
Scenario Outline: Create Token
When click the generate token dropdown
When select token type based on <PRIVILEGES> type
When set token description for <PRIVILEGES> as <DESCR>
When set token privileges for <BUCKET> as <PRIVILEGES>
When click popup save based on <PRIVILEGES>
Then the success notification contains "Token was created successfully"
When close all notifications
Then the tokens list contains the token described as "<DESCR>"
Examples:
|DESCR|BUCKET|PRIVILEGES|
| Un enterrement a Ornans | Courbet | RW |
| Nu descendant un escalier | Duchamp | R |
| La Femme a la perle | Corot | RW |
| Dismaland | DEFAULT | R |
| Cambpells Soup | All | RW |
| La Jocande | ALL |ALL |
@tested
Scenario Outline: Disable Token
When disable the token described as <DESCR>
Then the token described as <DESCR> is disabled
Examples:
|DESCR|
| Dismaland |
| Nu descendant un escalier |
| Cambpells Soup |
# Scenario: Sort By Status # not working see issue 15301
@error-collateral
Scenario: Sort By Name
Then the first tokens are sorted by description as "admin's Token, Campbells Soup, Dismaland, La Femme a la perle, La Jocande"
When click the tokens sorter button
When click the tokens sorter item "Description Asc"
Then the first tokens are sorted by description as "Un enterrement a Ornans, Nu descendant un escalier, La Jocande, La Femme a la perle, Dismaland"
When click the tokens sorter button
When click the tokens sorter item "Description Desc"
Then the first tokens are sorted by description as "admin's Token, Campbells Soup, Dismaland, La Femme a la perle, La Jocande"
@error-collateral
Scenario: Edit Description
When hover over the token description "La Jocande"
When click the token description toggle for "La Jocande"
When clear the edit input for description "La Jocande"
When set the new description of "La Jocande" to "La Dame a l hermine"
Then the success notification contains "Token was updated successfully"
Then the tokens list contains the token described as "La Dame a l hermine"
Then the tokens list does not contain the token described as "La Jocande"
When close all notifications
@tested
Scenario: Enable Token
When enable the token described as "Nu descendant un escalier"
Then the token described as "Nu descendant un escalier" is enabled
Then the success notification contains "Token was updated successfully"
When close all notifications
@tested
Scenario Outline: Review Token
When click on the token described as "<DESCR>"
Then the review token popup is loaded
Then the review token popup matches "<BUCKETS>" and "<PRIVILEGES>"
When dismiss the popup
Then popup is not loaded
Examples:
|DESCR|BUCKETS|PRIVILEGES|
| Un enterrement a Ornans | Courbet | read,write |
| Nu descendant un escalier | Duchamp | read |
| Cambpells Soup | All | read,write |
| La Dame a l hermine | ALL |ALL |
@tested
Scenario Outline: Delete Token
When hover over token card described as "<DESCR>"
When click the delete button of the token card described as "<DESCR>"
When click delete confirm of the token card described as "<DESCR>"
#When click token card popover delete confirm
Then the success notification contains "Token was deleted successfully"
Then the tokens list does not contain the token described as "<DESCR>"
Then close all notifications
Examples:
|DESCR|
| Un enterrement a Ornans |
| Nu descendant un escalier |
| La Femme a la perle |
| Dismaland |
| Cambpells Soup |
| La Dame a l hermine |

View File

@ -1,527 +0,0 @@
@feature-monitoring
@monitoring-alerts
@use-live-data
Feature: Monitoring - Alerts - Base
As a user I want to setup alerts
So that I can be notified of important changes in the data
@tested
Scenario: Load Initial Alerts view
Given I reset the environment
Given run setup over REST "DEFAULT"
#When hover over the "alerting" menu item
#When click nav sub menu "Monitoring & Alerting"
When API sign in user "DEFAULT"
When API create a label "Peano" described as "Theorie des ensembles" with color "#AAFFAA" for user "DEFAULT"
When API create a label "Euclide" described as "Geometrie euclidienne" with color "#FFAAAA" for user "DEFAULT"
When API create a label "Leibniz" described as "Calcul infinitésimal" with color "#AAAAFF" for user "DEFAULT"
When API create a label "Descartes" described as "Géométrie analytique" with color "#FFFFAA" for user "DEFAULT"
When start live data generator
# It seems 5s is the quickest we can use stably given default values in create check controls
# Tried 1s, but need to use agg function like mean so the checks do not seem to match
"""
{ "pulse": 5000, "model": "count10" }
"""
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Alerting"
Then the Alerting page is loaded
When wait "10" seconds
@tested
Scenario: Exercise Initial Alerts view Controls
Then the notification rules create dropdown is disabled
When click alerting tab "checks"
When click the create check button
Then the create check dropodown list contains the items
"""
threshold,deadman
"""
When click the create check button
Then the create check dropdown list is not visible
When hover the create check question mark
Then the create check tooltip is visible
When hover the alerts page title
Then the create check tooltip is not visible
When click alerting tab "endpoints"
When hover the create endpoint question mark
Then the create endpoint tooltip is visible
When hover the alerts page title
Then the create endpoint tooltip is not visible
When click alerting tab "rules"
When hover the create rule question mark
Then the create rules tooltip is visible
When hover the alerts page title
Then the create rules tooltip is not visible
When click alerting tab "endpoints"
When click create endpoint button
Then the create endpoint popup is loaded
When dismiss the popup
Then popup is not loaded
When click alerting tab "checks"
When click the first time create threshold check
Then the edit check overlay is loaded
When dismiss edit check overlay
Then the edit check overlay is not loaded
When click the first time create deadman check
Then the edit check overlay is loaded
When dismiss edit check overlay
Then the edit check overlay is not loaded
# Create and start endpoint listener for notification checks - maybe move to separate endpoints test suite
# Exercise Configure Check -- N.B. try and reuse dashboard time machine for Define Query
# TODO - Check illogical alert thresholds
# TODO - add simple tags check
@tested
Scenario: Exercise Configure Check - Threshold
When click the create check button
When click the create check dropdown item "Threshold"
# Query Builder steps cover same library as in dashboards - TODO - check for gaps
# For now cover just configure check step
When click check editor configure check button
Then the configure check view is loaded
Then the create check checklist contains:
"""
[{ "state": "error", "text": "One field" },
{ "state": "valid", "text": "One aggregate function" },
{ "state": "error", "text": "One or more thresholds"}]
"""
Then the check interval hint dropdown list is not visible
When click on check interval input
Then the check interval hint dropdown list includes
"""
5s,15s,1m,6h,24h,30d
"""
When click the interval hint dropdown list item "5m"
Then the check interval hint dropdown list is not visible
Then the interval indicator is set to "5m"
Then the check offset hint dropdown list is not visible
When click the check offset interval input
Then the check offset hint dropdown list includes
"""
0s,5s,1m,1h,12h,2d
"""
When click the offset hint dropdown list item "1m"
Then the check offset hint dropdown list is not visible
Then the offset input is set to "1m"
When update the check message template to
"""
Kapela z Varsavy
"""
Then the check message tempate contains
"""
Kapela z Varsavy
"""
When click add threshold condition "CRIT"
When click the threshold definition dropdown for condition "CRIT"
# TODO - after issue 17729 is resolved - should be equal criteria e.g. n == 0
Then the threshold definition dropdown for "CRIT" contain items:
"""
is above,is below,is inside range,is outside range
"""
When click the threshold definition dropodown item "Is Inside Range" for condition "CRIT"
Then there is a binary boundary for the threshold "CRIT" with values "20" and "100"
# N.B. currently cannot easily set negatve values - TODO use negative values once #17782 is resolved
# N.B. TODO - check dimensions of inputs - currently in smaller views they are unreadable #17783
When set the binary boundary for the threshold "CRIT" from "0" to "1000"
Then there is a binary boundary for the threshold "CRIT" with values "0" and "1000"
When click add threshold condition "WARN"
When click the threshold definition dropdown for condition "WARN"
When click the threshold definition dropodown item "Is Below" for condition "WARN"
When set the unary boundary value for the threshold definition "WARN" to "0"
Then there is a unary boundary for the threshhold "WARN" with the value "0"
When dismiss edit check overlay
Then the first time create threshold check is visible
Then the first time create deadman check is visible
@error-collateral
Scenario: Exercise configure check Deadman
# Just check Deadman fields others were covered in threshold test
When click the create check button
When click the create check dropdown item "Deadman"
When click check editor configure check button
Then the create check checklist contains:
"""
[{ "state": "error", "text": "One field" }]
"""
When click the deadman definition No Values For input
Then the deadman definition hints dropdown contains:
"""
15s,5m,1h,12h,7d
"""
When click the deadman definition hint dropdown item "1m"
Then the deadman definition No Values For input contains "1m"
When set the value of the deadman definition No Values for input to "30m"
When click the deadman definition level dropdown
Then the deadman definition level dropdown contains:
"""
CRIT,WARN,INFO,OK
"""
When click the deadman definition level dropdown item "WARN"
Then the deadman definition level dropdown selected item is "WARN"
When click the deadman definition Stop Checking input
Then the deadman definition stop hints dropdown contains:
"""
5s,1m,1h,24h,7d,30d
"""
When click the deadman definition stop hint dropdown item "5m"
Then the deadman definition stop input contains "5m"
When set the value of the definition stop input to "10m"
Then the deadman definition stop input contains "10m"
When dismiss edit check overlay
Then the first time create threshold check is visible
Then the first time create deadman check is visible
# Create Threshold Alerts
@tested
Scenario: Create Simple Threshold Check
When click the first time create threshold check
Then the create check checklist contains:
"""
[{ "state": "error", "text": "One field" },
{ "state": "valid", "text": "One aggregate function" },
{ "state": "error", "text": "One or more thresholds"}]
"""
Then the save check button is disabled
When enter the alert check name "Simple Count Check"
When send keys "ENTER"
When click the tag "test" in builder card "1"
When click the tag "val" in builder card "2"
When click the query builder function "mean"
Then the create check checklist contains:
"""
[{ "state": "valid", "text": "One field" },
{ "state": "valid", "text": "One aggregate function" },
{ "state": "error", "text": "One or more thresholds"}]
"""
Then the save check button is disabled
# 7.8.20 -- feature disabled - see issue 19249
# When click the time machine query builder function duration input
# When click the query builder function duration suggestion "5s"
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
When click check editor configure check button
Then the interval indicator is set to "1m"
Then the time machine cell edit preview graph is shown
When click the check offset interval input
When set the check interval input to "10s"
When enter into interval offset "1s"
When send keys "ENTER"
When update the check message template to
"""
${ r._check_name } is: ${ r._level } value was ${string(v: r.val)}
"""
When click add threshold condition "CRIT"
When click the threshold definition dropdown for condition "CRIT"
When click the threshold definition dropodown item "Is Above" for condition "CRIT"
When set the unary boundary value for the threshold definition "CRIT" to "7.5"
Then the create check checklist is not present
Then the save check button is enabled
Then the time machine cell edit preview contains threshold markers:
"""
CRIT
"""
When click the check editor save button
Then there is an alert card named "Simple Count Check"
# Create Deadman Alerts
@error-collateral
Scenario: Create simple Critical Deadman Check
# Just check Deadman fields others were covered in threshold test
When click the create check button
When click the create check dropdown item "Deadman"
When enter the alert check name "Deadman Critical Check"
When click the tag "test" in builder card "1"
When click the tag "val" in builder card "2"
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
When click check editor configure check button
When set the check interval input to "10s"
When set the check offset interval input "2s"
When click the edit check add tag button
When set the check tag key of tag "1" to "mrtvola"
When set the check tag value of tag "1" to "neboztik"
When click the edit check add tag button
When set the check tag key of tag "2" to "kartoffel"
When set the check tag value of tag "2" to "brambor"
When update the check message template to
"""
${ r._check_name } is: ${ r._level } value [${string(v: r.val)}] has stopped reporting
"""
When set the value of the deadman definition No Values for input to "30s"
When set the value of the definition stop input to "2m"
When click the check editor save button
Then there is an alert card named "Deadman Critical Check"
# Need second card for filter and sort tests
@error-collateral
Scenario: Create simple Warn Deadman Check
# Just check Deadman fields others were covered in threshold test
When click the create check button
When click the create check dropdown item "Deadman"
When enter the alert check name "Deadman Warn Check"
When click the tag "test" in builder card "1"
When click the tag "val" in builder card "2"
When click the time machine cell edit submit button
Then the time machine cell edit preview graph is shown
When click check editor configure check button
When set the check interval input to "10s"
When set the check offset interval input "2s"
When click the edit check add tag button
When update the check message template to
"""
${ r._check_name } is: ${ r._level } has stopped reporting. Last value [${string(v: r.val)}]
"""
When set the value of the deadman definition No Values for input to "20s"
When set the value of the definition stop input to "1m"
When click the check editor save button
Then the error notification contains "Failed to create check: tag must contain a key and a value"
When close all notifications
When remove check tag key "1"
When click the check editor save button
Then there is an alert card named "Deadman Warn Check"
# TODO - EDIT Threshold Check and drag threshold control in graph
# Edit Check Card
@error-collateral
Scenario: Edit Check Card
When hover over the name of the check card "Deadman Warn Check"
When click the name edit button of the check card "Deadman Warn Check"
When update the active check card name input to "Veille automatique - Avertissement"
When send keys "ENTER"
Then there is an alert card named "Veille automatique - Avertissement"
When hover over the description of the check card "Veille automatique - Avertissement"
When click the description edit button of the check card "Veille automatique - Avertissement"
When update the active check card description input to:
"""
Que ta voix, chat mystérieux, Chat séraphique, chat étrange... Baudelaire
"""
When send keys "ENTER"
Then the check card "Veille automatique - Avertissement" contains the description:
"""
Que ta voix, chat mystérieux, Chat séraphique, chat étrange... Baudelaire
"""
# Add labels to checks
@tested
Scenario: Add Labels To Checks
When click empty label for check card "Deadman Critical Check"
Then the add label popover is present
# dismiss popover
# TODO - once #17853 is fixed - use ESC key to dismiss popover
When click the checks filter input
Then the add label popover is not present
When click the add labels button for check card "Deadman Critical Check"
Then the add label popover is present
Then the add label popover contains the labels
"""
Peano,Euclide,Leibniz,Descartes
"""
When click the label popover item "Peano"
When click the label popover item "Leibniz"
Then the add label popover contains the labels
"""
Euclide,Descartes
"""
Then the add label popover does not contain the labels:
"""
Peano,Leibniz
"""
When set the label popover filter field to "Godel"
Then the add label popover does not contain the labels:
"""
Euclide,Descartes
"""
Then the label popover contains create new "Godel"
When clear the popover label selector filter
Then the add label popover contains the labels
"""
Euclide,Descartes
"""
Then the add label popover does not contain the labels:
"""
Peano,Leibniz
"""
Then the add label popover does not contain create new
# TODO - use escape to close popover once #17853 is resolved
When click the checks filter input
Then the add label popover is not present
Then the check card "Deadman Critical Check" contains the label pills:
"""
Peano,Leibniz
"""
When remove the label pill "Peano" from the check card "Deadman Critical Check"
Then the check card "Deadman Critical Check" contains the label pills:
"""
Leibniz
"""
Then the check card "Deadman Critical Check" does not contain the label pills:
"""
Peano
"""
When click the add labels button for check card "Deadman Critical Check"
Then the add label popover contains the labels
"""
Peano,Euclide,Descartes
"""
# TODO - use escape to close popover once #17853 is resolved
When click the checks filter input
# Clone check
@error-collateral
Scenario: Clone Check
When hover over the name of the check card "Simple Count Check"
# When wait "1" seconds
When click the check card "Simple Count Check" clone button
When click the check card "Simple Count Check" clone confirm button
Then there is an alert card named "Simple Count Check (clone 1)"
When click the check card name "Simple Count Check (clone 1)"
Then the edit check overlay is loaded
Then the current edit check name is "Simple Count Check (clone 1)"
Then the interval indicator is set to "10s"
Then the offset input is set to "1s"
Then the check message tempate contains
"""
${ r._check_name } is: ${ r._level } value was ${string(v: r.val)}
"""
Then there is a unary boundary for the threshhold "CRIT" with the value "7.5"
When click checkeditor define query button
Then there are "3" time machine builder cards
Then time machine builder card "1" contains:
"""
test
"""
Then time machine builder card "2" contains:
"""
val
"""
Then the item "test" in builder card "1" is selected
Then the item "val" in builder card "2" is selected
# TODO - verify Bucket Card contents after #17879 fixed
When enter the alert check name "Bécik"
When click the check editor save button
Then there is an alert card named "Bécik"
# Filter Checks
@error-collateral
Scenario: Filter Checks
Then the check cards column contains
"""
Simple Count Check, Deadman Critical Check, Veille automatique - Avertissement, Bécik
"""
When enter into the check cards filter field "Check"
Then the check cards column contains
"""
Simple Count Check, Deadman Critical Check
"""
Then the check cards column does not contain
"""
Veille automatique - Avertissement, Bécik
"""
When enter into the check cards filter field "Be"
Then the "checks" cards column empty state message is "No checks match your search"
When enter into the check cards filter field "Bé"
Then the check cards column contains
"""
Bécik
"""
Then the check cards column does not contain
"""
Simple Count Check, Deadman Critical Check
"""
When clear the check cards filter field
Then the check cards column contains
"""
Simple Count Check, Deadman Critical Check, Veille automatique - Avertissement, Bécik
"""
Scenario: Threshold Check history - basic
When hover over the name of the check card "Simple Count Check"
# Collect some data - generate at least 1 event
When wait "10" seconds
When click open history of the check card "Simple Count Check"
When click open history confirm of the check card "Simple Count Check"
# Just check page load
# Check history will be separate test feature
Then the Check statusses page is loaded
Then there are at least "1" events in the history
Then event no "1" contains the check name "Simple Count Check"
When click the check name of event no "1"
Then the edit check overlay is loaded
Then the current edit check name is "Simple Count Check"
When dismiss edit check overlay
Then the edit check overlay is not loaded
Then the Alerting page is loaded
Then there is an alert card named "Simple Count Check"
Scenario: Deadman Check history - basic
When stop live data generator
When wait "60" seconds
When hover over the name of the check card "Deadman Critical Check"
When click open history of the check card "Deadman Critical Check"
When click open history confirm of the check card "Deadman Critical Check"
Then the Check statusses page is loaded
Then there are at least "1" events in the history
Then event no "1" contains the check name "Deadman Critical Check"
Then there is at least "1" events at level "crit"
When click the check name of event no "1"
Then the edit check overlay is loaded
Then the current edit check name is "Deadman Critical Check"
When dismiss edit check overlay
Then the edit check overlay is not loaded
Then the Alerting page is loaded
Then there is an alert card named "Deadman Critical Check"
When start live data generator
# restart live generator as above
"""
{ "pulse": 5000, "model": "count10" }
"""
# Delete Check
Scenario Template: Delete Check
When hover over the name of the check card "<NAME>"
When click delete of the check card "<NAME>"
When click delete confirm of the check card "<NAME>"
Then there is no alert card named "<NAME>"
Examples:
|NAME|
|Bécik|
|Veille automatique - Avertissement|
|Deadman Critical Check|
|Simple Count Check|
# TODO - Edit Check definition -
# Edit Check definition
# Create Endpoints {HTTP, Slack, Pager Duty}
# Add labels to Endpoints
# Filter Endpoints
# Edit Endppints
# Create Rules
# Add labels to Rules
# Filter Rules
# Edit Rules
# Delete Checks (N.B. what is affect on dependent rules?)
# Delete Endpoints (N.B. what is affect on dependent rules?)
# Delete Rules
# Tear down data generator - In After All hook - needs to be torn down after failure as well as success
# Tear down http listened - In After All hook - ditto
# NOTE - perhaps should have five features - base, checks, endpoints, rules, full monitoring (too harvest alerts
# and notifications.) - breakup planned tests above into these feature files.

View File

@ -1,59 +0,0 @@
@feature-monitoring
@monitoring-alerts
@use-live-data
Feature: Monitoring - Alerts - History
As a user I want to setup alerts
So that I can be notified of important changes in the data
Scenario: Load Initial Alerts view
Given I reset the environment
Given run setup over REST "DEFAULT"
When API sign in user "DEFAULT"
When start live data generator
# It seems 5s is the quickest we can use stably given default values in create check controls
# Tried 1s, but need to use agg function like mean so the checks do not seem to match
"""
{ "pulse": 5000, "model": "count10" }
"""
When wait "10" seconds
When create check over API from file "etc/test-data/test_threshold_check.json" for user "DEFAULT"
When create check over API from file "etc/test-data/test_deadman_crit_check.json" for user "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Alerting"
Then the Alerting page is loaded
# Need to create events for toggle markers
When wait "60" seconds
# Exercise controls
Scenario: Exercise Event History Controls
When hover over the name of the check card "Threshold Check from File"
When click open history of the check card "Threshold Check from File"
When click open history confirm of the check card "Threshold Check from File"
When click event history filter input
Then the event history examples dropdown is visible
When click the alert history title
Then the event history examples dropdown is not visible
When get events history graph area
When get event marker types and locations
When zoom into event markers
Then the event marker locations have changed
Then the events history graph has changed
Then the event toggle "OK" is off
Then the event toggle "CRIT" is on
When get events history graph area
When get event marker types and locations
#Unzoom
When double click history graph area
Then the event marker locations have changed
Then the events history graph has changed
Then the event toggle "OK" is off
Then the event toggle "CRIT" is on
# Toggle markers
#incl. hover bars and heads
# Filter - N.B. clear filter shows all checks

View File

@ -1,84 +0,0 @@
@feature-onboarding
@onboarding-onboarding
Feature: Onboard to Influxdbv2
Create an initial user and organization
@tested
Scenario: Onboard Basic
# Golden path check 1
Given I reset the environment
Given I open the Influx onboarding page
Then there is a Welcome message
Then there is a link to corporate
When I click on Get Started
Then the Initial Setup Page is loaded
When enter a new user name "DEFAULT"
When enter a new password "DEFAULT"
When enter confirm the new password "DEFAULT"
When enter a new organization name "DEFAULT"
When enter a new bucket name "DEFAULT"
When click next from setup page
Then verify ready page
Then the success notification says "Initial user details have been successfully set"
When click quick start button
Then the success notification contains "Metrics Dashboard has been created"
Then the success notification contains "The InfluxDB Scraper has been configured"
When close all notifications
Then the home page is loaded
@tested
Scenario: Onboard Advanced
# Golden path check 2
Given I reset the environment
Given I open the Influx onboarding page
Then there is a Welcome message
Then there is a link to corporate
When I click on Get Started
Then the Initial Setup Page is loaded
When enter a new user name "DEFAULT"
When enter a new password "DEFAULT"
When enter confirm the new password "DEFAULT"
When enter a new organization name "DEFAULT"
When enter a new bucket name "DEFAULT"
When click next from setup page
Then verify ready page
Then the success notification says "Initial user details have been successfully set"
When close all notifications
When click advanced button
Then the buckets tab is loaded
@tested
Scenario: Onboard field checks
# N.B. would expect there to be rules for min/max length or allowed/disallowed characters in user-names
# however none currently exist -- TODO add tests for such rules if they are ever implemented
# TODO - setup breadcrumb color change on password length less than 8 chars
Given I reset the environment
Given I open the Influx onboarding page
Then there is a Welcome message
Then there is a link to corporate
When I click on Get Started
Then the Initial Setup Page is loaded
Then the continue button is disabled
When enter a new user name "zaphod"
When enter a new password "chachacha"
When enter confirm the new password "achachach"
Then the form error message says "Passwords do not match"
When enter confirm the new password "chachacha"
Then the form error message is not present
When enter a new organization name "asdf"
When enter a new bucket name "asdf"
When enter a new password "asdf"
When enter confirm the new password "asdf"
Then the form error message says "Password must be at least 8 characters"
Then the continue button is disabled
When enter a new password "chachacha"
When enter confirm the new password "chachacha"
When click next from setup page
Then verify ready page
Then the success notification says "Initial user details have been successfully set"
When click quick start button
Then the success notification contains "Metrics Dashboard has been created"
Then the success notification contains "The InfluxDB Scraper has been configured"
When close all notifications
Then the home page is loaded

View File

@ -1,152 +0,0 @@
@feature-settings
@settings-labels
Feature: Settings - Labels
As a user I want to Read Create Update and Delete Labels
So that I can manage the tag items used with Influxdbv2
@tested
Scenario: Open Labels Tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Settings"
When click the settings tab "Labels"
Then the labels Tab is loaded
@tested
Scenario: Exercise Create Label Popup
When I click the empty state Create Label button
Then the create Label popup is loaded
When dismiss the popup
Then popup is not loaded
When I click the header Create Label button
Then the create Label popup is loaded
When cancel the create label popup
Then popup is not loaded
When I click the header Create Label button
Then the color input color matches the preview color
Then the preview label pill contains "Name this Label"
When enter the value "Etiketa" into the label popup name input
Then the preview label pill contains "Etiketa"
When clear the label popup color input
Then the form element error message is "Please enter a hexcode"
When enter the value "#" into the label popup color input
Then the form element error message is "Must be 7 characters"
When clear the label popup color input
When enter the value "#FFC0CB" into the label popup color input
Then the color input color matches the preview color
When click the color select button I'm feeling lucky
Then the value in the label popup color input is not "#FFC0CB"
Then the color input color matches the preview color
When click the label popup color swatch "Ruby"
Then the value in the label popup color input is "#BF3D5E"
Then the color input color matches the preview color
Then the label popup preview text color is "#FFFFFF"
When click the label popup color swatch "Onyx"
Then the value in the label popup color input is "#31313d"
Then the color input color matches the preview color
Then the label popup preview text color is "#FFFFFF"
When click the label popup color swatch "Laser"
Then the value in the label popup color input is "#00C9FF"
Then the color input color matches the preview color
Then the label popup preview text color is "#202028"
When dismiss the popup
Then popup is not loaded
@tested
Scenario Outline: Create Label
When I click the header Create Label button
When clear the label popup name input
When enter the value "<NAME>" into the label popup name input
When clear the label popup description input
When enter the value "<DESCRIPTION>" into the label popup description input
When set the color in the label popup to "<COLOR>"
When click the label popup Create Label button
Then there is a label card named "<NAME>" in the labels list
Then the label card "<NAME>" has a pill colored "<COLOR>"
Then the label card "<NAME>" has description "<DESCRIPTION>"
Examples:
| NAME | DESCRIPTION | COLOR |
| Buk | Fagus sylvatica | Topaz |
| Habr | Carpinus betulus | #D2691E |
| Jilm | Ulmus laevis | Thunder |
| Javor | Acer pseudoplatanus | #924544 |
| Bouleau | Betula verrucosa | #F5EAD5 |
@tested
Scenario: Edit Label
When I click the Label Card Pill "Bouleau"
Then the edit label popup is loaded
When clear the label popup name input
When enter the value "Briza" into the label popup name input
When clear the label popup description input
When enter the value "Betula pendula" into the label popup description input
When set the color in the label popup to "#ECFC31"
Then the color input color matches the preview color
When click the label popup Save Changes button
Then there is a label card named "Briza" in the labels list
Then the label card "Briza" has a pill colored "#ECFC31"
Then the label card "Briza" has description "Betula pendula"
@tested
Scenario: Sort By Name
Then the first labels are sorted as "Briza,Buk,Habr,Javor,Jilm"
When click the sort type dropdown
When click sort by item "Name Desc"
Then the first labels are sorted as "Jilm,Javor,Habr,Buk,Briza"
When click the sort type dropdown
When click sort by item "Name Asc"
Then the first labels are sorted as "Briza,Buk,Habr,Javor,Jilm"
@error-collateral
Scenario: Sort By Description
When click the sort type dropdown
When click sort by item "Properties.Description Asc"
#When click sort label by description
Then the first labels are sorted as "Javor,Briza,Habr,Buk,Jilm"
When click the sort type dropdown
When click sort by item "Properties.Description Desc"
#When click sort label by description
Then the first labels are sorted as "Jilm,Buk,Habr,Briza,Javor"
@tested
Scenario: Filter Labels
When clear the labels filter input
When enter the value "J" into the label filter
Then the first labels are sorted as "Jilm,Javor"
Then the labels "Briza,Buk,Habr" are not present
When enter the value "AV" into the label filter
Then the first labels are sorted as "Javor"
Then the labels "Briza,Buk,Habr,Jilm" are not present
When clear the labels filter input
When enter the value "betul" into the label filter
Then the first labels are sorted as "Habr,Briza"
Then the labels "Buk,Javor,Jilm" are not present
When click the sort type dropdown
When click sort by item "Name Desc"
# There is a third neutral phase to the toggle - not anymore
#When click sort label by name
Then the first labels are sorted as "Habr,Briza"
When click the sort type dropdown
When click sort by item "Name Asc"
Then the first labels are sorted as "Briza,Habr"
When clear the labels filter input
Then the first labels are sorted as "Briza,Buk,Habr,Javor,Jilm"
@tested
Scenario Outline: Delete Label
When hover over label card "<NAME>"
When click delete for the label card "<NAME>"
When click delete confirm for the label card "<NAME>"
Then the labels "<NAME>" are not present
Examples:
| NAME |
| Briza |
| Buk |
| Habr |
| Javor |
| Jilm |

View File

@ -1,27 +0,0 @@
@feature-settings
@settings-settings
Feature: Settings - Base
As a user I want to open the settings page
So that I can explore how this Influx2 installation is set up
# TODO with alerting / load data refactor now submenu is richer
Scenario: Verify Tabs
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When open page "settings" for user "DEFAULT"
When click the settings tab "Variables"
Then the variables Tab is loaded
When click the settings tab "Templates"
Then the templates Tab is loaded
When click the settings tab "Labels"
Then the labels Tab is loaded
# When click the settings tab "Tokens" # Tokens tab is no longer available
# Then the tokens Tab is loaded # Tokens tab is no longer available
# The following items are no longer present commit=bd91a81123 build_date=2020-04-07T07:57:22Z
# When click the settings tab "Profile"
# Then the org profile Tab is loaded
# When click the settings tab "Members"
# Then the members Tab is loaded

View File

@ -1,168 +0,0 @@
@feature-settings
@settings-templates
Feature: Settings - Templates
As a user I want to Read Create Update and Delete Templatess
So that I can eventually use them to create dashboards in Influxdbv2
@tested
Scenario: Open Templates Tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When UI sign in user "DEFAULT"
When click nav menu item "Settings"
When click the settings tab "Templates"
Then the templates Tab is loaded
Then the templates are sorted as:
"""
Apache Data,Docker,Getting Started with Flux,GitHub Data,InfluxDB 2.0 OSS Metrics,JMeter,Kubernetes,Nginx,Redis,System
"""
When API sign in user "DEFAULT"
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"level", "start": "-30d", "algo": "hydro", "prec": "sec", "name": "hydro"}
"""
When generate a line protocol testdata for user "DEFAULT" based on:
"""
{ "points": 120, "measurement":"beat", "start": "-30d", "algo": "sine", "prec": "sec", "name": "sine"}
"""
@tested
Scenario: Exercise Import Template Popup
When click user templates
When click empty state import template button
Then the import template popup is loaded
Then the Import JSON as template button is disabled
When dismiss the popup
Then popup is not loaded
When click header import template button
Then click the import template paste button
Then the Import Template file upload area is not present
Then the Import Template paste JSON text area is present
When enter into the Impprt Template paste JSON text area:
"""
{}
"""
Then the Import JSON as template button is enabled
When click the import template upload button
Then the Import JSON as template button is disabled
Then the Import Template file upload area is present
Then the Import Template paste JSON text area is not present
When dismiss the popup
Then popup is not loaded
# TODO add variables to templates
@error-collateral
Scenario Outline: Import User Template File Upload
When click user templates
When click header import template button
When upload the template file "<FILEPATH>"
When click import template popup submit button
Then popup is not loaded
Then the success notification contains "Successfully imported template."
When close all notifications
# sometimes page is stuck in cache
When force page refresh
When wait "10" seconds
Then a REST template document for user "DEFAULT" titled "<TITLE>" exists
# Following step is work around for issue 15514
When click user templates
Then there is a template card named "<TITLE>"
Examples:
|TITLE|FILEPATH|
|Hydro test dashboard-Template|etc/test-data/hydro-test-template.json|
|Note Dashboard-Template|etc/test-data/note-dboard-template.json|
@error-collateral
Scenario Outline: Import User Template as JSON
When click header import template button
Then click the import template paste button
When paste contents of "<FILEPATH>" to template textarea
When click import template popup submit button
Then popup is not loaded
Then the success notification contains "Successfully imported template."
When close all notifications
# sometimes page is stuck in cache
When force page refresh
When wait "10" seconds
Then a REST template document for user "DEFAULT" titled "<TITLE>" exists
# Following step is work around for issue 15514
When click user templates
Then there is a template card named "<TITLE>"
Examples:
|TITLE|FILEPATH|
|Sinusoid test data-Template|etc/test-data/sine-test-template.json|
|Notepad-Template|etc/test-data/notepad-test-template.json|
@error-collateral
Scenario: Import Bad Template File
When click user templates
When click header import template button
When upload the template file "etc/test-data/bad-template.json"
When click import template popup submit button
Then popup is not loaded
Then the error notification contains "Failed to import template: Error: Request failed with status code 400"
When close all notifications
@error-collateral
Scenario: Filter Templates
When click user templates
When enter the value "Note" into the templates filter field
Then the templates are sorted as:
"""
Note Dashboard-Template,Notepad-Template
"""
Then the template cards "Hydro test dashboard-Template,Sinusoid test data-Template" are not present
When clear the templates filter
Then the templates are sorted as:
"""
Hydro test dashboard-Template,Note Dashboard-Template,Notepad-Template,Sinusoid test data-Template
"""
@error-collateral
Scenario: Sort Templates by Name
When click the sort type dropdown
When click sort by item "Meta.Name Desc"
Then the templates are sorted as:
"""
Sinusoid test data-Template,Notepad-Template,Note Dashboard-Template,Hydro test dashboard-Template
"""
When click the sort type dropdown
When click sort by item "Meta.Name Asc"
Then the templates are sorted as:
"""
Hydro test dashboard-Template,Note Dashboard-Template,Notepad-Template,Sinusoid test data-Template
"""
#Scenario: Exercise View Template Popup
# TODO - this part of UI was being rewritten
#Scenario: Clone Template
# TODO - this part of UI was being rewritten
#Scenario: Rename Template
# TODO - this part of UI was being rewritten
# N.B. generate some labels above - to be used in this test
# Scenario: Add Labels to Template
# Issue #15547 - create new label through templates runs into this minor issue
# Scenario: Create Dashboard from Template
# Covered in Dashboard tests
@error-collateral
Scenario Outline: Delete template
When hover over template card named "<NAME>"
When click the context delete button of template "<NAME>"
When click the delete confirm button of template "<NAME>"
Then the template cards "<NAME>" are not present
Examples:
|NAME|
|Hydro test dashboard-Template|
|Note Dashboard-Template |
|Notepad-Template |
|Sinusoid test data-Template |

View File

@ -1,349 +0,0 @@
@feature-settings
@settings-variables
Feature: Settings - Variables
As a user I want to Read Create Update and Delete Variables
So that I can eventually reuse them in alerts and dashboards in Influxdbv2
Scenario: Open Variables Tab
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When clear browser storage
When UI sign in user "DEFAULT"
When click nav menu item "Settings"
When click the settings tab "Variables"
Then the variables Tab is loaded
Scenario: Exercise Import Variable Popup
When click create variable dropdown in header
When click "import" variable dropdown item
Then the import variable popup is loaded
Then dismiss the popup
Then popup is not loaded
When click create variable dropdown empty
When click "import" variable dropdown item
Then the import variable popup is loaded
When click the Import Variable popup paste JSON button
Then the Import Variable JSON textarea is visible
Then the Import JSON as variable button is enabled
When click the Import Variable popup Upload File button
Then the Import Variable JSON textarea is not visible
Then the Import JSON as variable button is not enabled
Then the Import JSON file upload area is present
Then dismiss the popup
Then popup is not loaded
@tested
Scenario: Exercise Create Variable Popup
When click create variable dropdown in header
When click "new" variable dropdown item
Then the create variable popup is loaded
Then dismiss the popup
Then popup is not loaded
When click create variable dropdown empty
When click "new" variable dropdown item
Then the create variable popup is loaded
Then the create variable popup selected type is "Query"
Then the create variable popup create button is disabled
Then the create variable popup script editor is visible
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "Map"
Then the create variable popup selected type is "Map"
Then the create variable popup create button is disabled
Then the create variable popup script editor is not visible
Then the create variable popup textarea is visible
Then the create variable popup default value dropdown is visible
Then the create variable popup info line contains "0" items
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "constant"
Then the create variable popup selected type is "CSV"
Then the create variable popup create button is disabled
Then the create variable popup script editor is not visible
Then the create variable popup textarea is visible
Then the create variable popup default value dropdown is visible
Then the create variable popup info line contains "0" items
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "Query"
Then the create variable popup selected type is "Query"
Then the create variable popup create button is disabled
Then the create variable popup script editor is visible
Then the create variable popup textarea is not visible
Then the create variable popup default value dropdown is not visible
Then the create variable popup info line is not visible
Then click popup cancel simple button
Then popup is not loaded
Scenario Outline: Import Variable
When click create variable dropdown in header
When click "import" variable dropdown item
When upload the import variable file "<FILE>"
Then the import variable drag and drop header contains success "<FILE>"
When click the import variable import button
Then popup is not loaded
Then the success notification contains "Successfully created new variable: <NAME>"
Then close all notifications
Then there is a variable card for "<NAME>"
Examples:
|NAME|FILE|
|Bucket|etc/test-data/variable-query-bucket.json|
|Ryby|etc/test-data/variable-map-ryby.json|
|Jehlicnany|etc/test-data/variable-map-jehlicnany.json|
|Slavia|etc/test-data/variable-csv-slavia.json|
|Arsenal|etc/test-data/variable-csv-arsenal.json|
# TODO - failover on bad variable file
@tested
Scenario: Import Bad Variable
When click create variable dropdown in header
When click "import" variable dropdown item
When upload the import variable file "etc/test-data/variable-empty.json"
Then the import variable drag and drop header contains success "etc/test-data/variable-empty.json"
When click the import variable import button
Then popup is not loaded
Then the error notification contains "Failed to create variable:"
Then close all notifications
Scenario: Create Map Variable
When click create variable dropdown in header
When click "new" variable dropdown item
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "map"
When clear the create variable popup name input
When enter the create variable popup name "Primaty"
When enter the create variable popup values:
"""
Human,homo sapiens
Orangutan,pongo
Chimpanzee,pan troglodytes
Gorilla,gorilla
Baboon,papio
"""
When click the create variable popup title
Then the create variable popup info line contains "5" items
Then the selected default variable dropdown item is "Human"
When click the create variable popup default dropdown
When click the create variable popup default dropdown item "Chimpanzee"
Then the selected default variable dropdown item is "Chimpanzee"
When click the create variable popup create button
Then popup is not loaded
Then the success notification contains "Successfully created new variable: Primaty"
Then close all notifications
Then there is a variable card for "Primaty"
Scenario: Create CSV Variable
When click create variable dropdown in header
When click "new" variable dropdown item
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "constant"
When clear the create variable popup name input
When enter the create variable popup name "Obdobi"
When enter the create variable popup values:
"""
Antropocen,Holocen,Svrchni pleistocen,Stredni pleistocen,Spodni pleistocen
"""
When click the create variable popup title
Then the create variable popup info line contains "5" items
Then the selected default variable dropdown item is "Antropocen"
When click the create variable popup default dropdown
When click the create variable popup default csv dropdown item "Holocen"
Then the selected default variable dropdown item is "Holocen"
When click the create variable popup create button
Then popup is not loaded
Then the success notification contains "Successfully created new variable: Obdobi"
Then close all notifications
Then there is a variable card for "Obdobi"
Scenario: Create CSV Variable
When click create variable dropdown in header
When click "new" variable dropdown item
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "constant"
When clear the create variable popup name input
When enter the create variable popup name "Reals"
When enter the create variable popup values:
"""
1.0,2.0,2.72,3.0,3.14
"""
When click the create variable popup title
Then the create variable popup info line contains "5" items
Then the selected default variable dropdown item is "1.0"
When click the create variable popup default dropdown
When click the create variable popup default csv dropdown item "2.0"
Then the selected default variable dropdown item is "2.0"
When click the create variable popup create button
Then popup is not loaded
Then the success notification contains "Successfully created new variable: Reals"
Then close all notifications
Then there is a variable card for "Reals"
Scenario: Create Query Variable
When click create variable dropdown in header
When click "new" variable dropdown item
When click the create variable popup type dropdown
When click the create variable popup type dropdown item "Query"
When clear the create variable popup name input
When enter the create variable popup name "Kybl"
When enter the create variable popup Monaco Editor text:
"""
buckets()
|> filter(fn: (r) => r.name !~ /^_/)
|> rename(columns: {name: '_value'})
|> keep(columns: ['_value'])
"""
When click the create variable popup create button
Then popup is not loaded
Then the success notification contains "Successfully created new variable: Kybl"
Then close all notifications
Then there is a variable card for "Kybl"
Scenario: Filter Variables By Name
When enter the value "yb" into the variables filter
Then the variable cards "Kybl,Ryby" are visible
Then the variable cards "Arsenal,Bucket,Jehlicnany,Obdobi,Primaty,Reals,Slavia" are not present
Then the variable cards are sorted as "Kybl,Ryby"
When click the sort type dropdown
When click sort by item "Name Desc"
Then the variable cards are sorted as "Ryby,Kybl"
When click the sort type dropdown
When click sort by item "Name Asc"
#When click the variable sort by name button
When clear the variables filter
Then the variable cards "Arsenal,Bucket,Jehlicnany,Kybl,Obdobi,Primaty,Reals,Ryby,Slavia" are visible
# Sort by type not working - TODO fix after Issue 15379 fixed
Scenario: Sort Variables by name
Then the variable cards are sorted as "Arsenal,Bucket,Jehlicnany,Kybl,Obdobi,Primaty,Reals,Ryby,Slavia"
When click the sort type dropdown
When click sort by item "Name Desc"
#When click the variable sort by name button
# has third neutral state -- not any more
#When click the variable sort by name button
Then the variable cards are sorted as "Slavia,Ryby,Reals,Primaty,Obdobi,Kybl,Jehlicnany,Bucket,Arsenal"
When click the sort type dropdown
When click sort by item "Name Asc"
#When click the variable sort by name button
Then the variable cards are sorted as "Arsenal,Bucket,Jehlicnany,Kybl,Obdobi,Primaty,Reals,Ryby,Slavia"
Scenario: Rename Variable
When hover over variable card named "Ryby"
When click the context menu of the variable "Ryby"
When click the context menu item "Rename" of the variable "Ryby"
Then the variable name warning popup is visible
Then dismiss the popup
Then popup is not loaded
When hover over variable card named "Ryby"
When click the context menu of the variable "Ryby"
When click the context menu item "Rename" of the variable "Ryby"
Then the variable name warning popup is visible
When click the rename variable warning popup understand button
When click popup cancel simple button
Then popup is not loaded
When hover over variable card named "Ryby"
When click the context menu of the variable "Ryby"
When click the context menu item "Rename" of the variable "Ryby"
When click the rename variable warning popup understand button
When clear the rename variable popup name input
Then the rename variable form warning states "Variable name cannot be empty"
Then the rename variable from warning icon is visible
Then the rename variable submit button is disabled
When enter the new variable name "Kocky"
When click rename variable popup submit button
Then the success notification contains "Successfully updated variable: Kocky."
Then close all notifications
Then there is a variable card for "Kocky"
Scenario: Edit Map Variable to CSV
When click the variable card name "Kocky"
Then the edit variable popup is loaded
When click the edit variable popup type dropdown
When click the edit variable popup type dropdown item "constant"
Then the edit variable name input is disabled
When enter the edit variable popup values:
"""
Angora,Siamska,Barmska,Kartuzska,Ruska Modra
"""
When click the edit variable popup title
Then the create variable popup info line contains "5" items
Then the selected default variable dropdown item is "Angora"
When click the edit variable popup default dropdown
When click the edit variable popup default csv dropdown item "Kartuzska"
Then the selected default variable dropdown item is "Kartuzska"
When click the edit variable popup submit button
Then popup is not loaded
Then the success notification contains "Successfully updated variable: Kocky."
Then close all notifications
Then there is a variable card for "Kocky"
Scenario: Edit CSV Variable to Query
When click the variable card name "Slavia"
Then the edit variable popup is loaded
When click the edit variable popup type dropdown
When click the edit variable popup type dropdown item "query"
Then the edit variable name input is disabled
When enter the edit variable popup Query text:
"""
buckets()
|> filter(fn: (r) => r.name !~ /^_/)
|> rename(columns: {name: '_value'})
|> keep(columns: ['_value'])
"""
When click the edit variable popup title
When click the edit variable popup submit button
Then popup is not loaded
Then the success notification contains "Successfully updated variable: Slavia."
Then close all notifications
Then there is a variable card for "Slavia"
Scenario: Edit Query Variable to Map
When click the variable card name "Kybl"
Then the edit variable popup is loaded
When click the edit variable popup type dropdown
When click the edit variable popup type dropdown item "map"
Then the edit variable name input is disabled
Then the edit variable popup textarea is cleared
When enter the edit variable popup values:
"""
kolac,tvarohovy
kobliha,jahodova
buchta,svestkova
babovka,vanilkova
loupak,cokoladovy
pernik,domaci
"""
When click the edit variable popup title
Then the create variable popup info line contains "6" items
Then the selected default variable dropdown item is "kolac"
When click the edit variable popup default dropdown
When click the edit variable popup default csv dropdown item "babovka"
Then the selected default variable dropdown item is "babovka"
When click the edit variable popup submit button
Then popup is not loaded
Then the success notification contains "Successfully updated variable: Kybl."
Then close all notifications
Then there is a variable card for "Kybl"
@tested
Scenario Outline: Delete Variable
When hover over variable card named "<NAME>"
When click delete menu of variable card named "<NAME>"
When click delete confirm of variable card named "<NAME>"
Then the success notification contains "Successfully deleted the variable"
Then the variable card "<NAME>" is not present
Examples:
|NAME|
|Kybl|
|Kocky |
|Jehlicnany|
|Slavia |
|Arsenal |
|Bucket |
|Obdobi |
|Primaty |
|Reals |

View File

@ -1,36 +0,0 @@
@feature-signin
@signin-signin
Feature: Signin
Use and abuse the signin page
Scenario: Basic Signin
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When clear browser storage
#Then the heading contains "InfluxData"
Then the InfluxData heading is visible
Then the version shown contains "DEFAULT"
#Then the credits are valid
When enter the username "DEFAULT"
When enter the password "DEFAULT"
When click the signin button
Then the home page is loaded
@tested
Scenario Outline: Signin Bad Credentials
Given I reset the environment
Given run setup over REST "DEFAULT"
When open the signin page
When enter the username "<USERNAME>"
When enter the password "<PASSWORD>"
When click the signin button
Then the error notification contains "<MESSAGE>"
Examples:
| USERNAME | PASSWORD | MESSAGE |
| wumpus | DEFAULT | Could not sign in |
| DEFAULT | wuumpuus | Could not sign in |
# N.B. TODO - consider Security scenarios - Brute force password, injection attack

View File

@ -1,156 +0,0 @@
const fs = require('fs')
var {Before, After, AfterAll, Status} = require('cucumber');
var {logging} = require('selenium-webdriver');
var perfUtils = require(__srcdir + '/utils/performanceUtils.js');
/*
Before(function (scenario, callback) {
callback();
});
BeforeAll(async function (scenario, callback) {
// await __wdriver.get('chrome://settings/clearBrowserData').then(async () => {
// console.log("DEBUG clearing browser cache");
// await __wdriver.sleep(3000);
// await __wdriver.switchTo().activeElement();
//// await __wdriver.findElement(By.css("* /deep/ #clearBrowsingDataConfirm")).click();
// await __wdriver.findElement(By.css("clearBrowsingDataConfirm")).click();
// await __wdriver.sleep(3000);
// }).catch(async err => {
// console.log("DEBUG caught err " + err);
// throw err;
// });
callback();
})*/
async function writeScreenShot(filename) {
filename = filename.replace(/\s+/g, '_');
return await __wdriver.takeScreenshot().then(async (image, err) => {
await fs.writeFile(filename, image, 'base64', (err) => {
if (err) {
console.log(err)
}
})
return image
})
}
async function writeConsoleLog(filename){
filename = filename.replace(/\s+/g, '_');
await __wdriver.manage().logs().get(logging.Type.BROWSER).then(async logs => {
for(let log in logs){
fs.appendFileSync(filename, `[${(new Date(parseInt(logs[log].timestamp))).toISOString()}]${logs[log].level}:${logs[log].message}\n`);
}
})
}
async function writeDriverLog(filename){
filename = filename.replace(/\s+/g, '_');
await __wdriver.manage().logs().get(logging.Type.DRIVER).then(async logs => {
for(let log in logs){
fs.appendFileSync(filename, `[${(new Date(parseInt(logs[log].timestamp))).toISOString()}]:${logs[log].message}\n`);
}
})
}
let scenarioCt = 0;
let currentFeature = '';
Before(async function (scenario){
__currentFeature = scenario.sourceLocation.uri.substring(scenario.sourceLocation.uri.lastIndexOf("/") + 1).replace('.','-')
__currentScenario = scenario.pickle.name.trim();
//safety kill any live data generator
if(!await scenarioContainsTag(scenario, '@use-live-data') && __liveDataGenRunning){
console.log("killing live generator");
__killLiveDataGen = true;
}
});
async function scenarioContainsTag(scenario, tag){
let match = scenario.pickle.tags.find( elem => elem.name === tag)
//console.log("DEBUG match " + match);
return match !== undefined;
}
After(async function (scenario /*, callback */) {
//__wdriver.sleep(1500) //DEBUG - getting shots out of order
// Handled in cucumber.js
// if(!fs.existsSync(`./${__config.screenshot_dir}`)){
// fs.mkdir(`./${__config.screenshot_dir}`, () => {})
// }
__reportedResetOnce = true;
let uri = scenario.sourceLocation.uri
let feature = uri.substring(uri.lastIndexOf("/") + 1).replace('.','-')
let name = scenario.pickle.name.trim().replace(' ', '_');
name = name.replace('/', '-');
name = name.replace('\\', '-');
if(feature !== currentFeature){
scenarioCt = 0;
}
if(scenarioCt === 0){
currentFeature = feature;
}
// let now = new Date()
// let nowStr = now.getFullYear().toString() +
// (now.getMonth() + 1).toString().padStart(2, '0') +
// now.getDate().toString().padStart(2, '0') + "-" +
// now.getHours().toString().padStart(2, '0') +
// now.getMinutes().toString().padStart(2, '0') +
// now.getSeconds().toString().padStart(2, '0')
//let filebase = __config.screenshot_dir + '/' + feature + "-" + nowStr + "-" + name
let filebase = __screenShotDir + "/" + feature + "-" + (scenarioCt++).toString().padStart(2, '0') + "-" + name;
let world = this;
if(scenario.result.status === Status.FAILED){
await writeScreenShot(filebase + "-ERR" + ".png").then(async img => {
await world.attach(img, 'image/png')
});
await writeConsoleLog(filebase + '-ERR-console.log').catch(async e => {
throw('failed to write ' + filebase + '-ERR-console.log\n' + e);
});
await writeDriverLog(filebase + '-ERR-driver.log').catch(async e => {
throw('failed to write ' + filebase + '-ERR-console.log\n' + e);
})
}else {
await writeScreenShot(filebase + "--OK" + ".png").then(async img => {
await world.attach(img, 'image/png')
})
}
//callback()
});
AfterAll(async function ( ) {
__reportedResetOnce = false;
if(__liveDataGenRunning) {
console.log("killing live generator");
__killLiveDataGen = true;
}
if(perfUtils.performanceLog.length > 0){
await perfUtils.writePerformanceLog();
await perfUtils.writePerformanceReport();
}
});

View File

@ -1,42 +0,0 @@
{
"name": "selenium-accept",
"version": "0.0.1",
"description": "selenium acceptance tests for influxdbv2 ui",
"main": "index.js",
"scripts": {
"clean": "rm -rdf screenshots/*; rm report/*",
"influx:setup": "cd scripts && ./influxdb2_community_test_env.sh setup-qa && cd -",
"influx:stop": "./scripts/influxdb2_community_test_env.sh stop",
"influx:clean": "./scripts/influxdb2_community_test_env.sh clean",
"test": "mkdirp report && cucumber-js",
"report:html": "chmod 775 src/utils/htmlReport.js; src/utils/htmlReport.js",
"report:junit": "chmod 775 src/utils/junitReport.js; src/utils/junitReport.js",
"kill:chrome": "killall chrome || true"
},
"author": "",
"license": "ISC",
"devDependencies": {
"axios": "^0.19.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0",
"chai": "^4.2.0",
"chai-match": "^1.1.1",
"chromedriver": "^85.0.0",
"copy-paste": "^1.3.0",
"csv": "^5.3.1",
"cucumber": "^5.1.0",
"cucumber-html-reporter": "^5.0.0",
"cucumber-junit-convert": "^1.0.2",
"cucumber-pretty": "^1.5.2",
"eslint": "^7.1.0",
"geckodriver": "^1.16.2",
"mkdirp": "^0.5.1",
"selenium-webdriver": "^4.0.0-alpha.7"
},
"dependencies": {
"@influxdata/influxdb-client": "^1.3.0",
"@influxdata/influxdb-client-apis": "^1.3.0",
"expect.js": "^0.3.1"
}
}

View File

@ -1,3 +0,0 @@
FROM quay.io/influxdb/influx:nightly
ENTRYPOINT ["/entrypoint.sh", "--e2e-testing=true"]

View File

@ -1,15 +0,0 @@
FROM node:12.16
USER root
COPY package.json /home/e2e/package.json
WORKDIR /home/e2e
RUN npm install
COPY . /home/e2e
ENV PATH $PATH:./node_modules/.bin
ENTRYPOINT scripts/cloud-test.sh

View File

@ -1,18 +0,0 @@
FROM circleci/node:lts-stretch-browsers
USER root
COPY package.json /selenium-accept-infl2/package.json
WORKDIR /selenium-accept-infl2
RUN npm install
COPY . /selenium-accept-infl2
RUN \
mkdir report
ENV PATH $PATH:./node_modules/.bin
CMD cucumber-js

View File

@ -1,14 +0,0 @@
FROM node:12.16
USER root
COPY package.json /home/e2e/package.json
WORKDIR /home/e2e
RUN npm install
COPY . /home/e2e
ENV PATH $PATH:./node_modules/.bin

View File

@ -1,33 +0,0 @@
!#/usr/bin/env bash
sleep 30
sudo netstat -tlnp
curl -v --connect-timeout 60 --max-time 60 http://localhost:8086/debug/flush
git clone https://github.com/influxdata/influxdb.git
cd ~/project/influxdb/e2e/
npm install
npm test -- features/loadData/telegrafs.feature
TEST_RESULT=$?
echo TEST_RESULT = $TEST_RESULT
npm run report:junit
npm run report:html
echo "Saving Test Results"
mkdir -p ~/test-results/cucumber
mkdir -p ~/test-results/html
pwd
cp ~/project/influxdb/e2e/report/cucumber_junit.xml ~/test-results/cucumber/junit.xml
cp ~/project/influxdb/e2e/report/cucumber_report.html ~/test-results/html/cucumber_report.html
cp ~/project/influxdb/e2e/report/cucumber_report.json ~/test-results/cucumber/report.cucumber
cp -r ~/project/influxdb/e2e/screenshots ~/test-results
exit $TEST_RESULT

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
npm test -- activeConf=cloud cloud
sleep 15
npm run report:html
npm run report:junit

View File

@ -1,140 +0,0 @@
#!/usr/bin/env bash
APP_ROOT="$(dirname "$(dirname "$(readlink -fm "$0")")")"
TEST_CONTAINER=bonitoo_e2e
INFLUX2_CONTAINER=influx2_solo
E2E_MAP_DIR=/tmp/e2e
INFLUX2_HOST=$(sudo docker inspect -f "{{ .NetworkSettings.IPAddress }}" ${INFLUX2_CONTAINER})
INFLUX2_URL="http://${INFLUX2_HOST}:8086"
#TAGS="@influx-influx"
ACTIVE_CONF=development
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-t| --tags)
TAGS="$2"
shift; # past argument
shift; # past val
;;
-c| --config)
ACTIVE_CONF="$2"
shift;
shift;
;;
-b| --base)
BASE_DIR="$2"
shift;
shift;
esac
done
echo E2E_CLOUD_DEFAULT_USER_USERNAME = ${E2E_CLOUD_DEFAULT_USER_USERNAME}
echo Working from ${APP_ROOT}
DOCKER_TEST_CMD="npm test -- activeConf=${ACTIVE_CONF}"
if [[ -n "${TAGS}" ]]; then
DOCKER_TEST_CMD="${DOCKER_TEST_CMD} --tags ${TAGS}"
fi
if [[ -n "${BASE_DIR+x}" ]]; then
DOCKER_TEST_CMD="${DOCKER_TEST_CMD} ${BASE_DIR}"
fi
echo DOCKER_TEST_CMD = ${DOCKER_TEST_CMD}
if [ ${ACTIVE_CONF} = 'cloud' ]; then
echo configuring for cloud
if [ -z ${E2E_CLOUD_INFLUX_URL+x} ]; then
echo
echo E2E_CLOUD_INFLUX_URL is unset
echo But cloud configuration chosen
echo
echo Please set E2E_CLOUD_INFLUX_URL to use cloud configuration
exit 1
else
echo E2E_CLOUD_INFLUX_URL ${E2E_CLOUD_INFLUX_URL}
INFLUX2_URL=${E2E_CLOUD_INFLUX_URL}
fi
if [ -z ${E2E_CLOUD_DEFAULT_USER_PASSWORD} ]; then
echo
echo E2E_CLOUD_DEFAULT_USER_PASSWORD is unset
echo But cloud configuration chosen
echo
echo Please set E2E_CLOUD_DEFAULT_USER_PASSWORD to use cloud configuration
exit 1
fi
fi
echo "------ Targeting influx at ${INFLUX2_URL} ------"
# Tear down running test container
echo "----- Tearing down test container ${TEST_CONTAINER} ------"
if docker container inspect ${TEST_CONTAINER} > /dev/null 2>&1
then
if [ "$( docker container inspect -f '{{.State.Running}}' ${TEST_CONTAINER} )" == "true" ]; then
echo stopping ${TEST_CONTAINER}
sudo docker stop ${TEST_CONTAINER}
fi
echo removing ${TEST_CONTAINER}
sudo docker rm ${TEST_CONTAINER}
fi
# Ensure mapped dirs are current
echo "----- Ensuring linked dir for volumes is current ------"
if [ -L ${E2E_MAP_DIR}/etc ]; then
echo ${E2E_MAP_DIR}/etc is linked
echo removing ${E2E_MAP_DIR}
sudo rm -r ${E2E_MAP_DIR}
fi
sudo mkdir -p ${E2E_MAP_DIR}
echo linking ${APP_ROOT}/etc
sudo ln -s ${APP_ROOT}/etc ${E2E_MAP_DIR}/etc
echo "------ (Re)start Selenoid ------"
source ${APP_ROOT}/scripts/selenoid.sh
echo SELENOID_HOST is ${SELENOID_HOST}
# Rebuild and start test container
echo "----- Rebuilding test container ${TEST_CONTAINER} ------"
if [[ -d "$APP_ROOT/report" ]]; then
echo cleaning "$APP_ROOT/report"
sudo npm run clean
rm -rdf report
fi
DOCKER_ENVARS="-e SELENIUM_REMOTE_URL=http://${SELENOID_HOST}:4444/wd/hub -e E2E_${ACTIVE_CONF^^}_INFLUX_URL=${INFLUX2_URL}"
if [ -n ${E2E_CLOUD_DEFAULT_USER_PASSWORD} ]; then
DOCKER_ENVARS="${DOCKER_ENVARS} -e E2E_CLOUD_DEFAULT_USER_PASSWORD=${E2E_CLOUD_DEFAULT_USER_PASSWORD}"
fi
sudo docker build -t e2e-${TEST_CONTAINER} -f scripts/Dockerfile.tests .
sudo docker run -it -v `pwd`/report:/home/e2e/report -v `pwd`/screenshots:/home/e2e/screenshots \
-v /tmp/e2e/etc:/home/e2e/etc -v /tmp/e2e/downloads:/home/e2e/downloads \
${DOCKER_ENVARS} --detach \
--name ${TEST_CONTAINER} e2e-${TEST_CONTAINER}:latest
echo ACTIVE_CONF ${ACTIVE_CONF} BASE_DIR ${BASE_DIR} TAGS ${TAGS}
sudo docker exec ${TEST_CONTAINER} ${DOCKER_TEST_CMD}
sudo docker exec ${TEST_CONTAINER} npm run report:html
sudo docker exec ${TEST_CONTAINER} npm run report:junit
sudo docker stop ${TEST_CONTAINER}
sudo docker stop selenoid

View File

@ -1,200 +0,0 @@
#!/bin/sh
USE_DOCKER=1 # Docker or tarball
USE_ALPHA=0 # alpha or nightly
DEBUG=0
ACTION="setup"
TAR_DOWNLOAD="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.1_linux_amd64.tar.gz"
DOCKER_IMAGE="quay.io/influxdb/influx:nightly"
INSTANCE_NAME="influx2_solo"
INFLUX2_HOME="${HOME}/.influxdbv2"
LOG_DIR=${PWD}/log
LOG_FILE=${LOG_DIR}/docker.log
TELEGRAF_DOWNLOAD="https://dl.influxdata.com/telegraf/releases/telegraf_1.8.2-1_amd64.deb"
download_telegraf(){
echo "["$(date +"%d.%m.%Y %T")"] downloading telegraf.deb - if changed"
#curl -s -o telegraf.deb -z telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.7.2-1_amd64.deb
curl -s -o telegraf.deb -z telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.8.2-1_amd64.deb
}
install_telegraf(){
echo "["$(date +"%d.%m.%Y %T")"] installing telegraf.deb - if changed"
sudo dpkg -i telegraf.deb
echo "["$(date +"%d.%m.%Y %T")"] installed telegraf.deb - if changed"
}
stop_telegraf(){
echo "["$(date +"%d.%m.%Y %T")"] stoping telegraf.service - if changed"
sudo systemctl stop telegraf.service
echo "["$(date +"%d.%m.%Y %T")"] stoped telegraf.service - if changed"
}
pull_docker(){
echo "["$(date +"%d.%m.%Y %T")"] pulling ${DOCKER_IMAGE}"
docker pull ${DOCKER_IMAGE}
}
run_docker_influx(){
mkdir -p ${LOG_DIR}
echo "["$(date +"%d.%m.%Y %T")"] starting docker instance ${INSTANCE_NAME}"
sudo docker run --name ${INSTANCE_NAME} --publish 8086:8086 ${DOCKER_IMAGE} > ${LOG_FILE} 2>&1 &
echo "["$(date +"%d.%m.%Y %T")"] started instance $INSTANCE_NAME listening at port 8086."
echo "logfile at $LOG_FILE"
sleep 3
echo "\n$(tail -n32 $LOG_FILE)\n"
}
run_docker_influx_test_env(){
mkdir -p ${LOG_DIR}
sudo docker stop $INSTANCE_NAME
sudo docker rm $INSTANCE_NAME
sudo docker pull quay.io/influxdb/influx:nightly
sudo docker build -t influxdb_test_image .
sudo docker run --name $INSTANCE_NAME --publish 8086:8086 influxdb_test_image > ${LOG_FILE} 2>&1 &
}
stop_docker_influx(){
if [ "$(sudo docker ps -q -f name=$INSTANCE_NAME)" ] ; then
echo "["$(date +"%d.%m.%Y %T")"] stopping docker instance ${INSTANCE_NAME}"
sudo docker stop ${INSTANCE_NAME}
echo "["$(date +"%d.%m.%Y %T")"] stopped $INSTANCE_NAME"
fi
}
remove_docker_influx(){
if [ "$(sudo docker ps -a -q -f name=$INSTANCE_NAME)" ] ; then
echo "["$(date +"%d.%m.%Y %T")"] removing docker instance ${INSTANCE_NAME}"
sudo docker rm ${INSTANCE_NAME}
echo "["$(date +"%d.%m.%Y %T")"] removed $INSTANCE_NAME"
fi
}
clean_influx_home(){
echo "["$(date +"%d.%m.%Y %T")"] cleaning ${INFLUX2_HOME}"
sudo rm -rf ${INFLUX2_HOME}
echo "["$(date +"%d.%m.%Y %T")"] cleaned ${INFLUX2_HOME}"
}
usage(){
echo "usage $0"
echo " -a|--alpha use alpha release - otherwise nightly build is used"
echo " -t|--tarball use tarball build - otherwise docker is used"
echo " -n|--name set name of docker container - default $INSTANCE_NAME"
echo " setup|start start the service daemon - default action"
echo " shutdown|stop shutdown the service daemon"
echo " clean clean(remove) local directory ${INFLUX_HOME}"
echo " -h|--help print this message"
}
# Will need to get the telegraf config on first creating org
# then restart telegraf... Will be part of test cases
while [ "$1" != "" ]; do
case $1 in
-a | --alpha ) USE_ALPHA=1
DOCKER_IMAGE="quay.io/influxdb/influxdb:2.0.0-alpha"
;;
-t | --tarball ) USE_DOCKER=0
;;
-n | --name ) shift
INSTANCE_NAME=$1
;;
setup | start ) ACTION="setup"
;;
setup-qa | start-qa ) ACTION="setup-qa"
;;
stop | shutdown ) ACTION="stop"
;;
clean ) ACTION="clean"
;;
-h | --help ) usage
exit
;;
-d | --debug ) DEBUG=1
;;
* ) usage
exit 1
esac
shift
done
if [ $DEBUG -gt 0 ] ; then
echo "USE_DOCKER $USE_DOCKER"
echo "USE_ALPHA $USE_ALPHA"
echo "ACTION $ACTION"
echo "TAR_DOWNLOAD $TAR_DOWNLOAD"
echo "DOCKER_IMAGE $DOCKER_IMAGE"
echo "INSTANCE_NAME $INSTANCE_NAME"
echo "INFLUX2_HOME $INFLUX2_HOME"
echo "LOG_FILE $LOG_FILE"
echo "TELEGRAF_DOWNLOAD $TELEGRAF_DOWNLOAD"
fi
if [ $USE_ALPHA -ne 0 ] ; then
echo "USING ALPHA"
fi
if [ $USE_ALPHA -eq 0 ] && [ $USE_DOCKER -eq 0 ] ; then
echo "Nightly builds with tar balls not supported at this time"
exit 1
fi
if [ $USE_DOCKER -eq 0 ] ; then
echo "tarball install - not yet supported"
exit
fi
#if [ $USE_ALPHA -eq 0 ] && [ $USE_DOCKER -gt 0 ] ; then
case $ACTION in
setup ) stop_docker_influx
remove_docker_influx
download_telegraf
pull_docker
run_docker_influx
;;
setup-qa) run_docker_influx_test_env
;;
stop ) stop_docker_influx
;;
clean ) clean_influx_home
;;
* ) echo "Unhandled ACTION $ACTION"
exit 1
esac
#if [ "$ACTION" = "setup" ] ; then
# stop_docker_influx
# remove_docker_influx
# download_telegraf
# install_telegraf
# stop_telegraf
# pull_docker_nightly
# run_docker_influx
#elif [ "$ACTION" = "stop" ] ; then # stop docker nightly
# stop_docker_influx
# else
# echo "Unhandled ACTION $ACTION"
# exit 1
#fi
#fi
#if [ -z $1 ] ; then # check if first cmdline param is not set
# echo "["$(date +"%d.%m.%Y %T")"] USAGE: $0 [setup|start|stop]"
#elif [ "$1" = "setup" ] || [ "$1" = "start" ] ; then
# stop_docker_influx
# remove_docker_influx
# download_telegraf
## install_telegraf
## stop_telegraf
# pull_docker_nightly
# run_docker_influx
#elif [ "$1" = "stop" ] ; then
# stop_docker_influx
#fi

View File

@ -1,25 +0,0 @@
#!/bin/bash
APP_ROOT="$(dirname "$(dirname "$(readlink -fm "$0")")")"
sudo docker stop selenoid
sudo docker rm selenoid
sudo docker run -d --name selenoid -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock \
-v ${APP_ROOT}/etc/selenoid/config/:/etc/selenoid/:ro aerokube/selenoid:latest-release \
-enable-file-upload -video-output-dir ${APP_ROOT}/etc/selenoid/video -timeout 5m0s
sleep 10
export SELENOID_HOST=$(sudo docker inspect -f "{{ .NetworkSettings.IPAddress }}" selenoid)
echo SELENOID_HOST ${SELENOID_HOST}
sudo docker pull selenoid/vnc:chrome_83.0
#sudo docker pull selenoid/video-recorder:latest-release
if [ "$1" = "-debug" ]; then
echo debugging
sudo docker stop selenoid-ui
sudo docker rm selenoid-ui
docker run -d --name selenoid-ui -p 8080:8080 aerokube/selenoid-ui --selenoid-uri http://${SELENOID_HOST}:4444
fi

View File

@ -1,394 +0,0 @@
const { By, Condition, until, StaleElementReferenceError} = require('selenium-webdriver');
const notificationSuccessMsg = '[data-testid=notification-success] .notification--message';
const notificationErrorMsg = '[data-testid=notification-error] .notification--message';
const notificationPrimaryMsg = '[data-testid=notification-primary] .notification--message';
const notificationCloseButton = '[data-testid^=notification-] button';
const popupOverlayContainer = '[data-testid=overlay--container]';
const popupFormElementError = '[data-testid=form--element-error]';
const formInputError = '[data-testid=input-error]';
const popupOverlay = '[data-testid=overlay]';
const popupDismiss = '[data-testid=overlay--header] button[class*=dismiss]';
const popupCancel = '[data-testid=overlay] button[data-testid=button--cancel]';
const popupCancelSimple = '[data-testid=overlay--body] button[title=Cancel] ';
const popupWizardContinue = '[data-testid=overlay--body] [data-testid=next]';
const popupSave = '[data-testid=overlay--container] button[data-testid=button--save] ';
const popupSaveSimple = '[data-testid=overlay--footer] button[title=\'Save\']';
const popupCreate = '[data-testid=overlay--container] button[title=Create]';
const popupSubmit = '[data-testid=button][type=submit]';
const popupCopyToClipboard = '[data-testid=button-copy][title=\'Copy to Clipboard\']';
const popupWizardBack = '[data-testid=overlay--body] [data-testid=back]';
const popupWizardTitle = '[data-testid=overlay--body] .wizard-step--title';
const popupWizardSubTitle = '[data-testid=overlay--body] .wizard-step--sub-title';
const popupWizardDocsLink = '[data-testid=overlay--body] [data-testid=docs-link]';
const popupWizardStepStateText = 'p.line-protocol--status:nth-of-type(1)';
const popupTitle = '[data-testid=overlay--header] .cf-overlay--title';
const codeMirror = 'div.CodeMirror';
const monacoEditor = '.monaco-editor';
const popupAlert = '[data-testid=alert]';
const popupFileUpload = 'input[type=file]';
const popupFileUploadHeader = '.drag-and-drop--header';
const pageTitle = '[data-testid=page-title] ';
const popupBody = '[data-testid=overlay--body]';
const popupGithubLink = '//a[contains(text(), \'GitHub Repository\')]';
const popoverDialog = '[data-testid=popover--dialog]';
//generic controls
const sortTypeButton = '[data-testid=resource-sorter--button]';
const sortTypeListItem = '[data-testid=\'resource-sorter--%ITEM%\']';
const dropdownContents = '[data-testid=dropdown-menu--contents]';
const dropdownItemByText = '//*[@data-testid=\'dropdown-item\'][./*[text()=\'%TEXT%\']]';
//common controls
const labelPopover = '[data-testid=\'inline-labels--popover--dialog\']';
const labelListItem = '[data-testid=\'label-list--item %ITEM%\']';
const labelPopoverFilterField = '[data-testid=\'inline-labels--popover-field\']';
const labelPopoverCreateNewButton = '[data-testid=\'inline-labels--create-new\']';
class basePage{
constructor(driver){
this.driver = driver;
}
delay(timeout){
return new Promise((resolve) => {
setTimeout(resolve, timeout);
});
}
async waitUntilElementCss(selector){
await this.driver.wait(until.elementLocated(By.css(selector)));
}
async waitUntilElementVisibleCss(selector){
await this.driver.wait(until.elementIsVisible(await this.driver.findElement(By.css(selector))));
}
// selectors should be array of {type, selector}
async isLoaded(selectors, url = undefined){
if(url){
await this.driver.wait(until.urlContains(url), 5000);
}
//selectors.forEach(async (selector) => { //N.B. for each seems to be swallowing thrown errors
for(let i = 0; i < selectors.length; i++) {
switch (selectors[i].type) {
case 'css':
await this.driver.wait(until.elementLocated(By.css(selectors[i].selector)), 5000);
break;
case 'xpath':
await this.driver.wait(until.elementLocated(By.xpath(selectors[i].selector)), 5000);
break;
default:
throw `Unknown selector type ${JSON.stringify(selectors[i])}`;
}
// TODO - implement other selector types
}
//});
}
async getPopupOverlay(){
return await this.driver.findElement(By.css(popupOverlay));
}
static getPopupOverlaySelector(){
return { type: 'css', selector: popupOverlay};
}
async getNoficicationSuccessMsgs(){
await this.waitUntilElementVisibleCss(notificationSuccessMsg);
return await this.driver.findElements(By.css(notificationSuccessMsg));
}
async getNotificationErrorMsgs(){
await this.waitUntilElementVisibleCss(notificationErrorMsg);
return await this.driver.findElements(By.css(notificationErrorMsg));
}
async getNotificationPrimaryMsgs(){
await this.waitUntilElementVisibleCss(notificationPrimaryMsg);
return await this.driver.findElements(By.css(notificationPrimaryMsg));
}
async getNotificationCloseButtons(){
return await this.driver.findElements(By.css(notificationCloseButton));
}
// selector shold be of {type, selector}
// helper to avoid stale element exceptions etc.
async smartGetElement(selector, timeout = this.driver.manage().getTimeouts().implicit) {
let resultElem; // check staleness with resultElem.enabled() or similar
for (let i = 0; i < 3; i++) {
try {
switch (selector.type) {
case 'css':
await this.driver.wait(until.elementLocated(By.css(selector.selector)), timeout);
resultElem = await this.driver.findElement(By.css(selector.selector)).catch(async err => {
console.log('DEBUG CAUGHT ERROR ' + JSON.stringify(err));
console.log('AT ' + selector.selector);
throw err;
});
break;
case 'xpath':
await this.driver.wait(until.elementLocated(By.xpath(selector.selector)), timeout);
resultElem = await this.driver.findElement(By.xpath(selector.selector)).catch(async err => {
console.log('DEBUG CAUGHT ERROR ' + JSON.stringify(err));
console.log('AT ' + selector.selector);
throw err;
});
break;
default:
throw `Unknown selector type ${JSON.stringify(selector)}`;
}
await resultElem.isEnabled();
} catch (e) {
if (e instanceof StaleElementReferenceError && i !== 2) {
console.log('DEBUG caught ' + e);
//continue - try to get elem again
} else {
throw e;
}
}
}
return resultElem;
}
// selector should be of {type, selector}
async getUntilElementNotPresent(selector){
return new Condition('for no element to be located ' + selector, async () => {
switch(selector.type) {
case 'css':
return await this.driver.findElements(By.css(selector.selector)).then(function (elements) {
return elements.length === 0;
});
case 'xpath:':
return await this.driver.findElements(selector).then(function (elements) {
return elements.length === 0;
});
default:
throw `Unknown selector type ${JSON.stringify(selector)}`;
}
});
}
async getPopupOverlayContainer(){
return await this.driver.findElement(By.css(popupOverlayContainer));
}
static getPopupOverlayContainerSelector(){
return { type: 'css', selector: popupOverlayContainer};
}
async getPopupFormElementError(){
return await this.driver.findElement(By.css(popupFormElementError));
}
static getPopupFormElementErrorSelector(){
return { type: 'css', selector: popupFormElementError};
}
async getFormInputErrors(){
return await this.driver.findElements(By.css(formInputError));
}
static getFormInputErrorSelector(){
return { type: 'css', selector: formInputError};
}
async getPopupDismiss(){
return await this.driver.findElement(By.css(popupDismiss));
}
async getPopupCancel(){
return await this.driver.findElement(By.css(popupCancel));
}
async getPopupCancelSimple(){
return await this.driver.findElement(By.css(popupCancelSimple));
}
async getPopupSave(){
return await this.driver.findElement(By.css(popupSave));
}
async getPopupSaveSimple(){
return await this.driver.findElement(By.css(popupSaveSimple));
}
async getPopupSubmit(){
return await this.driver.findElement(By.css(popupSubmit));
}
async getPopupWizardContinue(){
return await this.driver.findElement(By.css(popupWizardContinue));
}
static getPopupWizardContinueSelector(){
return {type: 'css', selector: popupWizardContinue};
}
async getPopupWizardBack(){
return await this.driver.findElement(By.css(popupWizardBack));
}
static getPopupWizardBackSelector(){
return {type: 'css', selector: popupWizardBack};
}
async getPopupWizardTitle(){
return await this.driver.findElement(By.css(popupWizardTitle));
}
static getPopupWizardTitleSelector(){
return {type: 'css', selector: popupWizardTitle};
}
async getPopupWizardSubTitle(){
return await this.driver.findElement(By.css(popupWizardSubTitle));
}
static getPopupWizardSubTitleSelector(){
return {type: 'css', selector: popupWizardSubTitle};
}
async getPopupWizardDocsLink(){
return await this.driver.findElement(By.css(popupWizardDocsLink));
}
async getPopupWizardStepStateText(){
return await this.driver.findElement(By.css(popupWizardStepStateText));
}
async getPopupTitle(){
return await this.driver.findElement(By.css(popupTitle));
}
async getCodeMirror(){
return await this.driver.findElement(By.css(codeMirror));
}
async getMonacoEditor(){
return await this.driver.findElement(By.css(monacoEditor));
}
async getPopupAlert(){
return await this.driver.findElement(By.css(popupAlert));
}
async getPopupCopyToClipboard(){
return await this.driver.findElement(By.css(popupCopyToClipboard));
}
async getPopupCreate(){
return await this.driver.findElement(By.css(popupCreate));
}
async getPopupFormElementMessage(){
return await this.driver.findElement(By.css(popupFormElementError));
}
async getPopupFileUpload(){
return await this.driver.findElement(By.css(popupFileUpload));
}
async getPopupFileUploadSelector(){
return {type: 'css', selector: popupFileUpload};
}
async getPopupFileUploadHeader(){
return await this.driver.findElement(By.css(popupFileUploadHeader));
}
async getPageTitle(){
return await this.driver.findElement(By.css(pageTitle));
}
async getPopupBody(){
return await this.driver.findElement(By.css(popupBody));
}
static getPopupBodySelector(){
return { type: 'css', selector: popupBody };
}
async getPopupGithubLink(){
return await this.driver.findElement(By.xpath(popupGithubLink));
}
async getSortTypeButton(){
return await this.driver.findElement(By.css(sortTypeButton));
}
static getSortTypeButtonSelector(){
return { type: 'css', selector: sortTypeButton }
}
async getSortTypeListItem(item, normalize = true){
if(normalize) {
return await this.driver.findElement(By.css(sortTypeListItem.replace('%ITEM%', item.toLowerCase()
.replace(" ", "-"))));
}else{
return await this.driver.findElement(By.css(sortTypeListItem.replace('%ITEM%', item)));
}
}
async getDropdownContents(){
return await this.driver.findElement(By.css(dropdownContents));
}
static getDropdownContentsSelector(){
return { type: 'css', selector: dropdownContents };
}
async getDropdownItemByText(text){
return await this.driver.findElement(By.xpath(dropdownItemByText.replace('%TEXT%', text.trim())));
}
async getPopoverDialog(){
return await this.driver.findElement(By.css(popoverDialog));
}
static getpopoverDialogSelector(){
return { type: 'css', selector: popoverDialog };
}
async getLabelPopover(){
return await this.driver.findElement(By.css(labelPopover));
}
static getLabelPopoverSelector(){
return { type: 'css', selector: labelPopover };
}
async getLabelListItem(item){
return await this.driver.findElement(By.css(labelListItem.replace('%ITEM%', item)));
}
static getLabelListItemSelector(item){
return { type: 'css', selector: labelListItem.replace('%ITEM%', item) };
}
async getLabelPopoverFilterField(){
return await this.driver.findElement(By.css(labelPopoverFilterField));
}
async getLabelPopoverCreateNewButton(){
return await this.driver.findElement(By.css(labelPopoverCreateNewButton));
}
static getLabelPopoverCreateNewButtonSelector(){
return { type: 'css', selector: labelPopoverCreateNewButton };
}
}
module.exports = basePage;

View File

@ -1,55 +0,0 @@
const { By, Condition, until, StaleElementReferenceError} = require('selenium-webdriver');
const basePage = require(__srcdir + '/pages/basePage.js');
const emailInput = '[data-testid=\'input-field\']';
const passwordInput = '[data-testid=\'visibility-input\']';
const logInButton = '[data-testid=\'button\']';
const logInPanel = '[data-testid=\'panel\']';
const googleLoginButton = '[data-testid=button-base]';
const signupLink = '//*[text()=\'Sign Up\']';
const forgotPassLink = '//*[text()=\'Forgot Password\']';
const urlCtx = 'login';
class cloudLoginPage extends basePage {
constructor(driver) {
super(driver);
this.urlCtx = urlCtx;
this.driver = driver;
}
async isLoaded(){
await super.isLoaded([
{type: 'css', selector: emailInput},
{type: 'css', selector: passwordInput},
{type: 'css', selector: logInButton},
{type: 'css', selector: logInPanel},
{type: 'css', selector: googleLoginButton},
{type: 'xpath', selector: signupLink},
{type: 'xpath', selector: forgotPassLink}
], urlCtx);
}
async waitToLoad(timeout = 10000){
await this.driver.wait(until.elementLocated(By.css(logInPanel)), timeout,
`Login controls failed to load in ${timeout} milliseonds `);
}
async getEmailInput(){
return await this.driver.findElement(By.css(emailInput));
}
async getPasswordInput(){
return await this.driver.findElement(By.css(passwordInput));
}
async getLogInButton(){
return await this.driver.findElement(By.css(logInButton));
}
}
module.exports = cloudLoginPage;

View File

@ -1,51 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By } = require('selenium-webdriver');
const formOverlay = '[data-testid=overlay--children]';
const formOverlayHeader = '[data-testid=overlay--header]';
const formOverlayDismiss = '[data-testid=overlay--header] button.cf-overlay--dismiss';
const inputOrgName = '[placeholder*=organization]';
const inputBucketName = '[placeholder*=bucket]';
const buttonCancel = 'button[title=Cancel]';
const buttonCreate = 'button[title=Create]';
const urlCtx = 'orgs/new';
class createOrgPage extends basePage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: formOverlay},
{type: 'css', selector: formOverlayHeader},
{type: 'css', selector: formOverlayDismiss},
{type: 'css', selector: inputOrgName},
{type: 'css', selector: inputBucketName},
{type: 'css', selector: buttonCancel},
{type: 'css', selector: buttonCreate},
], urlCtx);
}
async getInputOrgName(){
return await this.driver.findElement(By.css(inputOrgName));
}
async getInputBucketName(){
return await this.driver.findElement(By.css(inputBucketName));
}
async getbuttonCancel(){
return await this.driver.findElement(By.css(buttonCancel));
}
async getbuttonCreate(){
return await this.driver.findElement(By.css(buttonCreate));
}
}
module.exports = createOrgPage;

View File

@ -1,533 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const timeMachineOverlay = '[data-testid=overlay]';
//const cellTitle = '[data-testid=overlay] [data-testid=page-header--left] [data-testid=page-title]';
const cellTitle = '[data-testid=overlay] [data-testid=page-header] [data-testid=page-title]';
const cellNameInput = ' [data-testid=renamable-page-title--input]';
//const viewTypeDropdown = '[data-testid=overlay] [data-testid=page-header--right] [data-testid=\'view-type--dropdown\']';
const viewTypeDropdown = '[data-testid=overlay] [data-testid=page-control-bar--left] [data-testid=\'view-type--dropdown\']';
const viewTypeListContents = '[data-testid=\'view-type--dropdown\'] [data-testid=dropdown-menu--contents]';
const viewTypeItem = '[data-testid=\'view-type--%ITEM%\']';
//const customizeButton = '[data-testid=overlay] [data-testid=page-header--right] [data-testid=\'cog-cell--button\']';
const customizeButton = '[data-testid=overlay] [data-testid=page-control-bar--left] [data-testid=\'cog-cell--button\']';
//const editCancel = '[data-testid=overlay] [data-testid=page-header--right] [data-testid=\'cancel-cell-edit--button\']';
const editCancel = '[data-testid=overlay] [data-testid=page-control-bar--right] [data-testid=\'cancel-cell-edit--button\']';
//const saveCell = '[data-testid=overlay] [data-testid=page-header--right] [data-testid=\'save-cell--button\']';
const saveCell = '[data-testid=overlay] [data-testid=page-control-bar--right] [data-testid=\'save-cell--button\']';
const TMTop = '.time-machine--top';
const TMBottom = '[data-testid=\'time-machine--bottom\']';
const TMViewEmptyGraphQueries = '[data-testid=overlay] [data-testid=empty-graph--no-queries]';
const TMViewNoResults = '[data-testid=overlay] [data-testid=empty-graph--no-results]';
const TMResizerHandle = '[data-testid=overlay] [data-testid=draggable-resizer--handle]';
const viewRawDataToggle = '[data-testid=overlay] .view-raw-data-toggle';
const TMAutorefreshDropdown = '[data-testid=overlay] [data-testid=time-machine--bottom] .autorefresh-dropdown [data-testid=dropdown--button]';
const TMAutorefreshDropdownPaused = '[data-testid=overlay] [data-testid=time-machine--bottom] .autorefresh-dropdown [data-testid=dropdown--button] [data-testid=\'icon\'].pause';
const TMAutorefreshDropdownSelected = '[data-testid=overlay] [data-testid=time-machine--bottom] .autorefresh-dropdown [data-testid=dropdown--button] .cf-dropdown--selected';
const TMAutorefreshItem = '//*[@data-testid=\'dropdown-item\'][./*[text()=\'%ITEM%\']]';
const TMAutorefreshForceButton = '[class=time-machine] [class^=autorefresh-dropdown] [data-testid=square-button]';
const TMTimeRangeDropdown = '[data-testid=overlay] [data-testid=time-machine--bottom] [data-testid=timerange-dropdown]';
const TMTimeRangeDropdownItem = '[data-testid=dropdown-item-%ITEM%]';
const TMTimeRangeDropdownContents = '[data-testid=dropdown-menu--contents]';
const switchToScriptEditor = '[data-testid=overlay] [data-testid=time-machine--bottom] [data-testid=switch-to-script-editor] ';
const TMSwitchToQueryBuilder = '[data-testid=switch-query-builder-confirm--button]';
const TMSwitchToQBuilderConfirm = '[data-testid=switch-query-builder-confirm--confirm-button]';
const TMSwitchToQBuilderWarn = '[data-testid=switch-query-builder-confirm--popover--contents]';
const timemachineSubmit = '[data-testid=time-machine-submit-button] ';
const TMQueryTabByName = '//*[contains(@class,\'query-tab \')][./*[@title=\'%NAME%\']]';
const TMQueryBuilder = '[data-testid=query-builder]';
//const functionSelect = '[data-testid=function-selector]';
//const bucketSelect = '[data-testid=bucket-selector]';
const TMBucketSelectorBucket = '[data-testid=bucket-selector] [data-testid=\'selector-list %NAME%\']';
const TMBucketSelectorFilter = '[data-testid=bucket-selector] [data-testid=\'input-field\']';
const TMBuilderCards = '[data-testid=builder-card]';
const bucketSelectItem = '[data-testid=bucket-selector] [data-testid=\'selector-list %ITEM%\'] ';
const bucketSelectSearch = '[data-testid=bucket-selector] [data-testid=builder-card--menu] [class *= search]';
const scriptEditorCodeMirror = '.CodeMirror';
//const scriptMonacoEditor = '.monaco-editor';
const scriptMonacoEditor = '.inputarea';
const TMFluxEditor = '[data-testid=flux-editor]';
const graphCanvas = '[data-testid=\'overlay\'] canvas[data-testid^=giraffe-layer]';
const graphCanvasAxes = '[data-testid=\'overlay\'] canvas[data-testid=giraffe-axes]';
const viewOptionsContainer = '.view-options';
const TMEmptyGraphErrMessage = '.empty-graph-error pre';
const TMDownloadCSV = '[data-testid=button][title*=\'CSV\']';
//Query builder
const TMQBSelectedBucket = '[data-testid=bucket-selector] [data-testid^=\'selector-list\'][class*=selected]';
const TMQBSelectedTagOfCard = '//*[@data-testid=\'builder-card\'][.//*[@data-testid=\'tag-selector--container %INDEX%\']]//*[contains(@data-testid,\'selector-list\')][contains(@class,\'selected\')]';
const TMBuilderCardMenuDurationInput = '[data-testid=\'duration-input\']';
const TMBuilderCardMenuFunctionListItem = '[data-testid=\'selector-list %ITEM%\']';
const TMBuilderCardMenuFunctionFilter = '[data-testid=\'input-field\'][placeholder*=\'functions\']';
const TMBuilderCardMenuFunctionListItems = '[data-testid=function-selector] [data-testid^=\'selector-list\']';
const TMQBSelectedFunctionsByName = '[data-testid=\'selector-list %NAME%\'].selected';
const TMQBDurationSuggestions = '[data-testid=\'dropdown-menu--contents\'] [data-testid=\'dropdown-item\']';
const TMQBDurationSuggestionByName = '//*[@data-testid=\'dropdown-menu--contents\']//*[@data-testid=\'dropdown-item\'][./*[text()=\'%NAME%\']]';
const TMBuilderTabsAddQuery = '[data-testid=overlay] [class=time-machine-queries--tabs] [data-testid=square-button]';
const TMQBActiveQueryTab = '.query-tab__active';
const TMQBQueryTabByName = '//*[contains(@class,\'query-tab\')][./*[text()=\'%NAME%\']]';
const TMQBRightClickItem = '[data-testid=\'right-click--%ITEM%-tab\']';
const TMQBQueryTabNameInput = 'div.cf-input__focused input';
const TMQBQueryTabs = '.time-machine-queries .query-tab';
const TMQBCustomFunctionGroup = '[data-testid=custom-function]';
const TMQBCustomWindowPeriod = '[data-testid=\'custom-window-period\']';
const TMQBAutoWindowPeriod = '[data-testid=\'auto-window-period\']';
//Query Editor
const TMQEFunctionCategory = '//*[@class=\'flux-toolbar--heading\'][text()=\'%NAME%\']';
const TMQEFunctionListItem = '[data-testid=\'flux--%NAME%\']';
const TMQEFunctionListItemInjector = '[data-testid=\'flux--%NAME%--inject\']';
const TMQEFunctionFilter = '.flux-toolbar--search [data-testid=\'input-field\']';
const TMQEFunctionPopup = '[data-testid=\'toolbar-popover--contents\']';
const TMQEFunctionPopupDescription = '[data-testid=\'toolbar-popover--contents\'] .flux-functions-toolbar--description span';
const TMQEFunctionPopupSnippet = '//*[@data-testid=\'toolbar-popover--contents\']//*[@class=\'flux-function-docs--heading\'][text()=\'Example\']/../*[@class=\'flux-function-docs--snippet\']';
const TMQEVariablesTab = '[data-testid=toolbar-tab][title=\'Variables\']';
const TMQEVariablesLabel = '[data-testid=\'variable-name--%LABEL%\']';
const TMQEVariablesInject = '[data-testid=\'variable--%VAR%--inject\']';
const TMQEVariablesFilter = '[data-testid=input-field][placeholder^=\'Filter Variables\']';
const TMQEVariablesPopover = '[data-testid=toolbar-popover--dialog]';
const TMQEVariablesPopoverContents = '[data-testid=\'toolbar-popover--contents\']';
const TMQEVariablePopoverDropdown = '[data-testid=\'variable--tooltip-dropdown\'] [data-testid=\'dropdown--button\'] .caret-down';
//RawData
const TMRawDataTable = '[data-testid=raw-data-table]';
const TMRawDataToggle = '[data-testid=raw-data--toggle]';
const TMRawDataReactGrid = '[data-testid=raw-data-table] [class=ReactVirtualized__Grid__innerScrollContainer]';
const TMRawDataCells = '[class=\'raw-flux-data-table--cell\']';
const TMRawDataCellByIndex = '[data-testid=raw-data-table] .raw-flux-data-table--cell:nth-of-type(%INDEX%)';
const TMRawDataScrollTrackH = '[data-testid=raw-data-table] [class=fancy-scroll--track-h]';
const TMRawDataScrollHThumb = '[data-testid=raw-data-table] [class=fancy-scroll--thumb-h]';
const TMRawDataScrollTrackV = '[data-testid=raw-data-table] [class=fancy-scroll--track-v]';
const TMRawDataScrollVThumb = '[data-testid=raw-data-table] [class^=fancy-scroll--thumb-v]';
const urlCtx = 'cells';
class cellEditOverlay extends influxPage {
constructor(driver) {
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: cellTitle},
{type: 'css', selector: viewTypeDropdown},
{type: 'css', selector: customizeButton},
{type: 'css', selector: editCancel},
{type: 'css', selector: saveCell},
{type: 'css', selector: TMResizerHandle},
{type: 'css', selector: viewRawDataToggle},
{type: 'css', selector: TMAutorefreshDropdown},
{type: 'css', selector: TMTimeRangeDropdown},
// {type: 'css', selector: switchToScriptEditor},
{type: 'css', selector: timemachineSubmit},
//{type: 'css', selector: queryBuilder},
// {type: 'css', selector: functionSelect},
//{type: 'css', selector: bucketSelect}
], urlCtx);
}
static getTimeMachineOverlay(){
return {type: 'css', selector: timeMachineOverlay};
}
async getTMTop(){
return await this.driver.findElement(By.css(TMTop));
}
async getTMBottom(){
return await this.driver.findElement(By.css(TMBottom));
}
async getCellTitle(){
return await this.driver.findElement(By.css(cellTitle));
}
async getCellNameInput(){
return await this.driver.findElement(By.css(cellNameInput));
}
async getBucketSelectItem(item){
return await this.driver.findElement(By.css(bucketSelectItem.replace('%ITEM%', item)));
}
async getBucketSelectSearch(){
return await this.driver.findElement(By.css(bucketSelectSearch));
}
static getBucketSelectSearchSelector(){
return { type: 'css', selector: bucketSelectSearch };
}
async getEditCancel(){
return await this.driver.findElement(By.css(editCancel));
}
async getSaveCell(){
return await this.driver.findElement(By.css(saveCell));
}
async getTMTimeRangeDropdown(){
return await this.driver.findElement(By.css(TMTimeRangeDropdown));
}
async getTMTimeRangeDropdownItem(item){
//console.log("DEBUG selector " + TMTimeRangeDropdownItem.replace('%ITEM%', item));
return await this.driver.findElement(By.css(TMTimeRangeDropdownItem.replace('%ITEM%', item)));
}
async getTimemachineSubmit(){
return await this.driver.findElement(By.css(timemachineSubmit));
}
async getSwitchToScriptEditor(){
return await this.driver.findElement(By.css(switchToScriptEditor));
}
async getScriptEditorCodeMirror(){
return await this.driver.findElement(By.css(scriptEditorCodeMirror));
}
async getScriptMonacoEditor(){
return await this.driver.findElement(By.css(scriptMonacoEditor));
}
async getGraphCanvas(){
return await this.driver.findElement(By.css(graphCanvas));
}
static getGraphCanvasSelector(){
return { type: 'css', selector: graphCanvas };
}
async getGraphCanvasAxes(){
return await this.driver.findElement(By.css(graphCanvasAxes));
}
static getGraphCanvasAxesSelector(){
return { type: 'css', selector: graphCanvasAxes };
}
async getViewTypeDropdown(){
return await this.driver.findElement(By.css(viewTypeDropdown));
}
async getViewTypeItem(item){
return await this.driver.findElement(By.css(viewTypeItem.replace('%ITEM%', item)));
}
async getViewTypeListContents(){
return await this.driver.findElement(By.css(viewTypeListContents));
}
static getViewTypeListContentsSelector(){
return { type: 'css', selector: viewTypeListContents };
}
async getCustomizeButton(){
return await this.driver.findElement(By.css(customizeButton));
}
async getViewOptionsContainer(){
return await this.driver.findElement(By.css(viewOptionsContainer));
}
static getViewOptionsContainerSelector(){
return { type: 'css', selector: viewOptionsContainer };
}
async getTMViewEmptyGraphQueries(){
return await this.driver.findElement(By.css(TMViewEmptyGraphQueries));
}
async getTMViewNoResults(){
return await this.driver.findElement(By.css(TMViewNoResults));
}
async getTMAutorefreshDropdown(){
return await this.driver.findElement(By.css(TMAutorefreshDropdown));
}
async getTMAutorefreshDropdownSelected(){
return await this.driver.findElement(By.css(TMAutorefreshDropdownSelected))
}
async getTMAutorefreshDropdownPaused(){
return await this.driver.findElement(By.css(TMAutorefreshDropdownPaused));
}
async getTMAutorefreshItem(item){
return await this.driver.findElement(By.xpath(TMAutorefreshItem.replace('%ITEM%', item)));
}
async getTMAutorefreshForceButton(){
return await this.driver.findElement(By.css(TMAutorefreshForceButton));
}
static getTMAutorefreshForceButtonSelector(){
return { type: 'css', selector: TMAutorefreshForceButton };
}
async getTMTimeRangeDropdownContents(){
return await this.driver.findElement(By.css(TMTimeRangeDropdownContents));
}
static getTMTimeRangeDropdownContentsSelector(){
return { type: 'css', selector: TMTimeRangeDropdownContents };
}
async getTMQueryTabByName(name){
return await this.driver.findElement(By.xpath(TMQueryTabByName.replace('%NAME%',name)));
}
async getTMQueryBuilder(){
return await this.driver.findElement(By.css(TMQueryBuilder));
}
async getTMFluxEditor(){
return await this.driver.findElement(By.css(TMFluxEditor));
}
async getTMDownloadCSV(){
return await this.driver.findElement(By.css(TMDownloadCSV));
}
static getTMFluxEditorSelector(){
return { type: 'css', selector: TMFluxEditor };
}
async getTMSwitchToQueryBuilder(){
return await this.driver.findElement(By.css(TMSwitchToQueryBuilder));
}
async getTMSwitchToQBuilderConfirm(){
return await this.driver.findElement(By.css(TMSwitchToQBuilderConfirm));
}
static getTMSwitchToQBuilderWarnSelector(){
return { type: 'css', selector: TMSwitchToQBuilderWarn };
}
async getTMSwitchToQBuilderWarn(){
return await this.driver.findElement(By.css(TMSwitchToQBuilderWarn));
}
async getTMBucketSelectorBucket(name){
return await this.driver.findElement(By.css(TMBucketSelectorBucket.replace('%NAME%', name)));
}
static getTMBucketSelectorBucketSelector(name){
return { type: 'css', selector: TMBucketSelectorBucket.replace('%NAME%', name) };
}
async getTMBucketSelectorFilter(){
return await this.driver.findElement(By.css(TMBucketSelectorFilter));
}
async getTMBuilderCards(){
return await this.driver.findElements(By.css(TMBuilderCards));
}
async getTMBuilderCardByIndex(index){
return (await this.driver.findElements(By.css(TMBuilderCards)))[index - 1];
}
async getTMBuilderCardMenuDurationInput(){
return await this.driver.findElement(By.css(TMBuilderCardMenuDurationInput));
}
async getTMBuilderCardMenuFunctionListItem(item){
return await this.driver.findElement(By.css(TMBuilderCardMenuFunctionListItem.replace('%ITEM%', item)));
}
static getTMBuilderCardMenuFunctionListItemSelector(item){
return { type: 'css', selector: TMBuilderCardMenuFunctionListItem.replace('%ITEM%', item) };
}
async getTMBuilderCardMenuFunctionFilter(){
return await this.driver.findElement(By.css(TMBuilderCardMenuFunctionFilter));
}
async getTMBuilderCardMenuFunctionListItems(){
return await this.driver.findElements(By.css(TMBuilderCardMenuFunctionListItems));
}
async getTMQBCustomFunctionGroup(){
return await this.driver.findElement(By.css(TMQBCustomFunctionGroup));
}
async getTMQBCustomWindowPeriod(){
return await this.driver.findElement(By.css(TMQBCustomWindowPeriod));
}
async getTMQBAutoWindowPeriod(){
return await this.driver.findElement(By.css(TMQBAutoWindowPeriod));
}
async getTMQBDurationSuggestions(){
return await this.driver.findElements(By.css(TMQBDurationSuggestions));
}
async getTMQBDurationSuggestionByName(name){
return await this.driver.findElement(By.xpath(TMQBDurationSuggestionByName.replace('%NAME%', name)));
}
async getTMResizerHandle(){
return await this.driver.findElement(By.css(TMResizerHandle));
}
async getTMBuilderTabsAddQuery(){
return await this.driver.findElement(By.css(TMBuilderTabsAddQuery));
}
async getTMQBSelectedBucket(){
return await this.driver.findElement(By.css(TMQBSelectedBucket));
}
async getTMQBSelectedTagOfCard(index){
return await this.driver.findElement(By.xpath(TMQBSelectedTagOfCard.replace('%INDEX%', index)));
}
async getTMQBActiveQueryTab(){
return await this.driver.findElement(By.css(TMQBActiveQueryTab));
}
async getTMQBQueryTabByName(name){
return await this.driver.findElement(By.xpath(TMQBQueryTabByName.replace('%NAME%', name)));
}
static getTMQBQueryTabSelectorByName(name){
return { type: 'xpath', selector: TMQBQueryTabByName.replace('%NAME%', name)};
}
async getTMQBSelectedFunctionByName(name){
return await this.driver.findElements(By.css(TMQBSelectedFunctionsByName.replace('%NAME%', name)));
}
async getTMQBRightClickItem(item){
return await this.driver.findElement(By.css(TMQBRightClickItem.replace('%ITEM%', item.toLowerCase().trim())));
}
async getTMQBQueryTabNameInput(){
return await this.driver.findElement(By.css(TMQBQueryTabNameInput));
}
async getTMQBQueryTabs(){
return await this.driver.findElements(By.css(TMQBQueryTabs));
}
async getTMEmptyGraphErrMessage(){
return await this.driver.findElement(By.css(TMEmptyGraphErrMessage));
}
async getTMQEFunctionCategory(name){
return await this.driver.findElement(By.xpath(TMQEFunctionCategory.replace('%NAME%', name)));
}
async getTMQEFunctionListItem(name){
return await this.driver.findElement(By.css(TMQEFunctionListItem.replace('%NAME%', name)));
}
static getTMQEFunctionListItemSelector(name){
return { type: 'css', selector: TMQEFunctionListItem.replace('%NAME%', name) };
}
async getTMQEFunctionListItemInjector(name){
return await this.driver.findElement(By.css(TMQEFunctionListItemInjector.replace('%NAME%',name)));
}
async getTMQEFunctionFilter(){
return await this.driver.findElement(By.css(TMQEFunctionFilter));
}
async getTMQEFunctionPopupDescription(){
return await this.driver.findElement(By.css(TMQEFunctionPopupDescription));
}
async getTMQEFunctionPopupSnippet(){
return await this.driver.findElement(By.xpath(TMQEFunctionPopupSnippet));
}
static getTMQEFunctionPopupSelector(){
return { type: 'css', selector: TMQEFunctionPopup };
}
async getTMRawDataTable(){
return await this.driver.findElement(By.css(TMRawDataTable));
}
static getTMRawDataTableSelector(){
return { type: 'css', selector: TMRawDataTable}
}
async getTMRawDataToggle(){
return await this.driver.findElement(By.css(TMRawDataToggle));
}
async getTMRawDataCells(){
return await this.driver.findElements(By.css(TMRawDataCells));
}
async getTMRawDataReactGrid(){
return await this.driver.findElement(By.css(TMRawDataReactGrid));
}
async getTMRawDataScrollTrackH(){
return await this.driver.findElement(By.css(TMRawDataScrollTrackH));
}
async getTMRawDataScrollHThumb(){
return await this.driver.findElement(By.css(TMRawDataScrollHThumb));
}
async getTMRawDataCellByIndex(index){
return await this.driver.findElement(By.css(TMRawDataCellByIndex.replace('%INDEX%',index)));
}
async getTMRawDataScrollTrackV(){
return await this.driver.findElement(By.css(TMRawDataScrollTrackV));
}
async getTMRawDataScrollVThumb(){
return await this.driver.findElement(By.css(TMRawDataScrollVThumb));
}
async getTMQEVariablesTab(){
return await this.driver.findElement(By.css(TMQEVariablesTab));
}
async getTMQEVariablesLabel(label){
return await this.driver.findElement(By.css(TMQEVariablesLabel.replace('%LABEL%', label)));
}
static getTMQEVariablesLabelSelector(label){
return { type: 'css', selector: TMQEVariablesLabel.replace('%LABEL%', label) }
}
async getTMQEVariablesInject(variable){
return await this.driver.findElement(By.css(TMQEVariablesInject.replace('%VAR%', variable)));
}
async getTMQEVariablesFilter(){
return await this.driver.findElement(By.css(TMQEVariablesFilter));
}
async getTMQEVariablesPopover(){
return await this.driver.findElement(By.css(TMQEVariablesPopover));
}
static getTMQEVariablesPopoverSelector(){
return { type: 'css', selector: TMQEVariablesPopover };
}
async getTMQEVariablePopoverDropdown(){
return await this.driver.findElement(By.css(TMQEVariablePopoverDropdown));
}
async getTMQEVariablesPopoverContents(){
return await this.driver.findElement(By.css(TMQEVariablesPopoverContents));
}
}
module.exports = cellEditOverlay;

View File

@ -1,321 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const pageTitle = '[data-testid=page-title]';
const nameInput = '[data-testid=renamable-page-title--input]';
//const graphToolTips = '[data-testid=page-header--right] [data-testid=graphtips-question-mark]';
const graphToolTips = '[data-testid=page-control-bar] [data-testid=graphtips-question-mark]';
//const addCellButtonHeader = '//*[@data-testid=\'page-header--right\']//*[@data-testid=\'button\'][.//*[text()=\'Add Cell\']]';
const addCellButtonHeader = '//*[@data-testid=\'page-control-bar--left\']//*[@data-testid=\'button\'][.//*[text()=\'Add Cell\']]';
//const addNoteButton = '//*[@data-testid=\'page-header--right\']//*[@data-testid=\'button\'][.//*[text()=\'Add Note\']]';
const addNoteButton = '[data-testid=add-note--button]';
//const variablesButton = '//*[@data-testid=\'page-header--right\']//*[@data-testid=\'button\'][.//*[text()=\'Variables\']]';
const variablesButton = '[data-testid=variables--button]';
//const timeLocaleDropdown = '//*[@data-testid=\'page-header--right\']//*[@data-testid=\'dropdown--button\'][.//*[contains(@class,\'annotate\')]]';
const timeLocaleDropdown = '//*[@data-testid=\'page-control-bar--right\']//*[@data-testid=\'dropdown--button\'][.//*[contains(@class,\'annotate\')]]';
//const autorefresh = '//*[@data-testid=\'page-header--right\']/*[contains(@class,\'autorefresh-dropdown\')]';
const autorefresh = '//*[@data-testid=\'page-control-bar--right\']/*[contains(@class,\'autorefresh-dropdown\')]';
//const refreshRateDropdown = '//*[@data-testid=\'page-header--right\']//*[contains(@class,\'autorefresh\')]//*[@data-testid=\'dropdown--button\']';
const refreshRateDropdown = '//*[@data-testid=\'page-control-bar--right\']//*[contains(@class,\'autorefresh\')]//*[@data-testid=\'dropdown--button\']';
//const forceRefreshButton = '//*[@data-testid=\'page-header--right\']//*[contains(@class,\'autorefresh\')]//*[@data-testid=\'square-button\']';
const forceRefreshButton = '//*[@data-testid=\'page-control-bar--right\']//*[contains(@class,\'autorefresh\')]//*[@data-testid=\'square-button\']';
//const timeRangeDropdown = '//*[@data-testid=\'page-header--right\']//*[@data-testid=\'timerange-dropdown\']//*[@data-testid=\'dropdown--button\']';
const timeRangeDropdown = '//*[@data-testid=\'page-control-bar--right\']//*[@data-testid=\'timerange-dropdown\']//*[@data-testid=\'dropdown--button\']';
const timeRangeDropdownSelected = '[data-testid=\'timerange-dropdown\'] [class*=selected]';
const timeRangeDropdownItem = '[data-testid=dropdown-item-past%ITEM%]';
//const presentationModeButton = '//*[@data-testid=\'page-header--right\']//*[contains(@title,\'Presentation\')]';
const presentationModeButton = '[data-testid=\'presentation-mode-toggle\']';
const variableValueDropdownButtonForVar = '//*[@class=\'variable-dropdown\'][.//*[text()=\'%VARNAME%\']]//*[@data-testid=\'variable-dropdown--button\']';
const variableValueDropdownItem = '//*[@class=\'variable-dropdown\'][.//*[text()=\'%VARNAME%\']]//*[@data-testid=\'variable-dropdown\']//*[@data-testid=\'variable-dropdown--item\'][.//*[text()=\'%ITEM%\']]'
const dropdownMenuItem = '//*[@data-testid=\'dropdown-menu\']//*[contains(@data-testid,\'dropdown-item\')]/*[text()=\'%ITEM%\']';
const dropdownMenuDivider = '//*[@data-testid=\'dropdown-menu\']//*[@data-testid=\'dropdown-divider\'][text()=\'%LABEL%\']';
const emptyStateTextLink = '[data-testid=\'empty-state--text\'] a';
const emptyStateAddCellButton = '[data-testid=\'empty-state\'] [data-testid=\'add-cell--button\']';
const cellByName = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]';
const cellEmptyGraphMessage = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'empty-graph--no-queries\']';
const cellEmptyGraphNoResults = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'empty-graph--no-results\']';
const cellEmptyGraphError = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'empty-graph--error\']';
const cellEmptyGraphErrorIcon = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'empty-graph--error\']//*[contains(@class,\'empty-graph-error--icon\')]';
const emptyGraphPopoverContents = '[data-testid^=emptygraph-popover--contents]';
const cellTitle = '//*[@class=\'cell--header\'][./*[text()=\'%NAME%\']]';
const cellHandleByName = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@class=\'cell--draggable\']';
const cellResizerByName = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@class=\'react-resizable-handle\']';
const cellContextToggleByName = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'cell-context--toggle\']';
const cellNoteByName = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@class=\'cell--note-indicator\']';
const cellPopoverContents = '[data-testid=popover--contents]';
const cellPopoverContentsConfigure = '[data-testid=popover--contents] [data-testid=\'cell-context--configure\']';
const cellPopoverContentsAddNote = '[data-testid=popover--contents] [data-testid=\'cell-context--note\']';
const cellPopoverContentsClone = '[data-testid=popover--contents] [data-testid=\'cell-context--clone\']';
const cellPopoverContentsDelete = '[data-testid=popover--contents] [data-testid=\'cell-context--delete\']';
const cellPopoverContentsDeleteConfirm = '[data-testid=popover--contents] [data-testid=\'cell-context--delete-confirm\']';
const cellPopoverContentsEditNote = '[data-testid=cell-context--note]';
const cellCanvasLine = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'giraffe-layer-line\']';
const cellCanvasAxes = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'giraffe-axes\']';
const cellHoverBox = '[data-testid=giraffe-layer-hover-line]';
const notePopupCodeMirror = '[data-testid=overlay--body] .CodeMirror';
const notePopupNoDataToggle = '[data-testid=overlay--body] [data-testid=slide-toggle]';
const notePopupEditorPreview = '[data-testid=overlay--body] .note-editor--preview';
const notePopupEditorPreviewTag = '[data-testid=overlay--body] .note-editor--preview %TAG%';
const notePopupEditorPreviewText = '[data-testid=overlay--body] .note-editor--preview .markdown-format';
const notePopupGuideLink = '[href*=\'markdownguide.org\']';
const notePopupCancel = '[data-testid=overlay--footer] button[title=Cancel]';
const notePopupSave = '[data-testid=overlay--footer] button[title=Save]';
const notePopover = '[data-testid=popover--dialog]';
const notePopoverContents = '[data-testid=popover--dialog] .markdown-format';
const noteCellMarkdownTag = '[data-testid=\'cell--view-empty markdown\' ] .markdown-format %TAG%';
const noteCellContextEdit = '[data-testid=cell-context--note]';
const urlCtx = 'dashboards';
class dashboardPage extends influxPage {
constructor(driver) {
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: pageTitle},
{type: 'css', selector: graphToolTips},
{type: 'xpath', selector: addCellButtonHeader},
{type: 'css', selector: addNoteButton},
{type: 'css', selector: variablesButton},
{type: 'xpath', selector: timeLocaleDropdown},
{type: 'xpath', selector: autorefresh},
{type: 'xpath', selector: timeRangeDropdown},
{type: 'css', selector: presentationModeButton}], urlCtx);
}
async getPageTitle(){
//return await this.driver.findElement(By.css(pageTitle));
return await this.smartGetElement({type: 'css', selector: pageTitle});
}
async getNameInput(){
return await this.driver.findElement(By.css(nameInput));
}
async getCellByName(name){
return await this.driver.findElement(By.xpath(cellByName.replace('%NAME%', name)));
}
static getCellSelectorByName(name){
return {type: 'xpath', selector: cellByName.replace('%NAME%', name) };
}
async getCellsByName(name){
return await this.driver.findElements(By.xpath(cellByName.replace('%NAME%', name)));
}
async getGraphToolTips(){
return await this.driver.findElement(By.css(graphToolTips));
}
async getAddCellButtonHeader(){
return await this.driver.findElement(By.xpath(addCellButtonHeader));
}
async getAddNoteButton(){
return await this.driver.findElement(By.css(addNoteButton));
}
async getVariablesButton(){
return await this.driver.findElement(By.css(variablesButton));
}
async getTimeLocaleDropdown(){
return await this.driver.findElement(By.xpath(timeLocaleDropdown));
}
async getRefreshRateDropdown(){
return await this.driver.findElement(By.xpath(refreshRateDropdown));
}
async getForceRefreshButton(){
return await this.driver.findElement(By.xpath(forceRefreshButton));
}
async getTimeRangeDropdown(){
return await this.driver.findElement(By.xpath(timeRangeDropdown));
}
async getTimeRangeDropdownSelected(){
return await this.driver.findElement(By.css(timeRangeDropdownSelected));
}
async getTimeRangeDropdownItem(item){
return await this.driver.findElement(By.css(timeRangeDropdownItem.replace('%ITEM%', item)));
}
async getPresentationModeButton(){
return await this.driver.findElement(By.css(presentationModeButton));
}
async getEmptyStateTextLink(){
return await this.driver.findElement(By.css(emptyStateTextLink));
}
async getEmptyStateAddCellButton(){
return await this.driver.findElement(By.css(emptyStateAddCellButton));
}
async getDropdownMenuItem(item){
return await this.driver.findElement(By.xpath(dropdownMenuItem.replace('%ITEM%', item)));
}
async getdropdownMenuDivider(label){
return await this.driver.findElement(By.xpath(dropdownMenuDivider.replace('%LABEL%', label)));
}
async getCellEmptyGraphMessage(name){
return await this.driver.findElement(By.xpath(cellEmptyGraphMessage.replace('%NAME%', name)));
}
async getCellEmptyGraphNoResults(name){
return await this.driver.findElement(By.xpath(cellEmptyGraphNoResults.replace('%NAME%', name)));
}
async getCellEmptyGraphError(name){
return await this.driver.findElement(By.xpath(cellEmptyGraphError.replace('%NAME%', name)));
}
async getCellTitle(name){
return await this.driver.findElement(By.xpath(cellTitle.replace('%NAME%', name)));
}
async getCellHandleByName(name){
return await this.driver.findElement(By.xpath(cellHandleByName.replace('%NAME%', name)));
}
async getCellResizerByName(name){
return await this.driver.findElement(By.xpath(cellResizerByName.replace('%NAME%', name)));
}
static getCellPopoverContentsSelector(){
return { type: 'css', selector: cellPopoverContents};
}
async getCellContextToggleByName(name){
return await this.driver.findElement(By.xpath(cellContextToggleByName.replace('%NAME%', name)));
}
async getCellPopoverContentsConfigure(){
return await this.driver.findElement(By.css(cellPopoverContentsConfigure));
}
async getCellPopoverContentsAddNote(){
return await this.driver.findElement(By.css(cellPopoverContentsAddNote));
}
async getCellPopoverContentsClone(){
return await this.driver.findElement(By.css(cellPopoverContentsClone));
}
async getCellPopoverContentsDelete(){
return await this.driver.findElement(By.css(cellPopoverContentsDelete));
}
async getCellPopoverContentsDeleteConfirm(){
return await this.driver.findElement(By.css(cellPopoverContentsDeleteConfirm));
}
async getcellPopoverContentsEditNote(){
return await this.driver.findElement(By.css(cellPopoverContentsEditNote));
}
async getNotePopupCodeMirror(){
return await this.driver.findElement(By.css(notePopupCodeMirror));
}
async getNotePopupNoDataToggle(){
return await this.driver.findElement(By.css(notePopupNoDataToggle));
}
async getNotePopupEditorPreview(){
return await this.driver.findElement(By.css(notePopupEditorPreview));
}
async getNotePopupEditorPreviewText(){
return await this.driver.findElement(By.css(notePopupEditorPreviewText));
}
async getNotePopupGuideLink(){
return await this.driver.findElement(By.css(notePopupGuideLink));
}
async getNotePopupCancel(){
return await this.driver.findElement(By.css(notePopupCancel));
}
async getNotePopupSave(){
return await this.driver.findElement(By.css(notePopupSave));
}
async getCellNoteByName(name){
return await this.driver.findElement(By.xpath(cellNoteByName.replace('%NAME%', name)));
}
async getNotePopoverContents(){
return await this.driver.findElement(By.css(notePopoverContents));
}
async getNotePopover(){
return await this.driver.findElement(By.css(notePopover));
}
static getNotePopoverSelector(){
return { type: 'css', selector: notePopover};
}
async getNotePopupEditorPreviewTag(tag){
return await this.driver.findElement(By.css(notePopupEditorPreviewTag.replace('%TAG%', tag)));
}
async getCellCanvasLine(name){
return await this.driver.findElement(By.xpath(cellCanvasLine.replace('%NAME%', name)));
}
async getCellCanvasAxes(name){
return await this.driver.findElement(By.xpath(cellCanvasAxes.replace('%NAME%', name)));
}
async getCellHoverBox(){
return await this.driver.findElement(By.css(cellHoverBox));
}
async getEmptyGraphPopoverContents(){
return await this.driver.findElement(By.css(emptyGraphPopoverContents));
}
async getCellEmptyGraphErrorIcon(name){
return await this.driver.findElement(By.xpath(cellEmptyGraphErrorIcon.replace('%NAME%', name)));
}
async getVariableValueDropdownButtonForVar(varname){
return await this.driver.findElement(By.xpath(variableValueDropdownButtonForVar.replace('%VARNAME%', varname)));
}
static getVariableValueDropdownButtonForVarSelector(varname){
return {type: 'xpath', selector: variableValueDropdownButtonForVar.replace('%VARNAME%', varname)};
}
async getVariableValueDropdownItem(varname,item){
return await this.driver.findElement(By.xpath(variableValueDropdownItem
.replace("%VARNAME%", varname)
.replace("%ITEM%", item)));
}
async getNoteCellMarkdownTag(tag){
return await this.driver.findElement(By.css(noteCellMarkdownTag.replace('%TAG%', tag)));
}
}
module.exports = dashboardPage;

View File

@ -1,332 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const createDashboardDropdown = '[data-testid=add-resource-dropdown--button]';
const filterDashboards = '[data-testid=search-widget]';
const sortTypeButton = '[data-testid=resource-sorter--button]:nth-of-type(1)';
const sortTypeItem = '[data-testid=\'resource-sorter--%ITEM%\']';
const modifiedSortButton = '[data-testid=resource-list--sorter]:nth-of-type(2)';
const createDashboardDropdownEmpty = '[data-testid=\'page-contents\'] [data-testid=\'add-resource-dropdown--button\']';
const createDashboardItems = '[data-testid^=add-resource-dropdown--][id]';
const dashboardCardByName = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]';
const dashboardCardExportButton = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@class=\'context-menu--container\'][.//*[text() = \'Export\']]';
const dashboardCardExportConfirm = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[text()=\'Export\']';
const dashboardCardCloneButton = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@class=\'context-menu--container\'][.//*[text() = \'Clone\']]';
const dashboardCardCloneConfirm = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@class=\'context-menu--container\']//*[text() = \'Clone\']';
const dashboardCardDeleteButton = '//*[@data-testid=\'dashboard-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-delete-menu\']';
const dashboardCardDeleteConfirm = '//*[@data-testid=\'dashboard-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-delete-dashboard\']';
//const dashboardCardName = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'dashboard-card--name\']';
const dashboardCardName = '//*[@data-testid=\'dashboard-card\']//span[text() = \'%NAME%\']';
const dashboardCardNames = '[data-testid=\'dashboard-card--name\']';
const dashboardCardNameButton = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'dashboard-card--name-button\']';
const dashboardCardNameInput = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'dashboard-card--input\']';
const dashboardCardDescription = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']';
const dashboardCardDescriptionEdit = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']//*[@data-testid=\'icon\']';
const dashboardCardDescriptionInput = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']//*[@data-testid=\'input-field\']';
const dashboardCardLabelsEmpty = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'inline-labels--empty\']';
const dashboardCardAddLabels = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'inline-labels--add\']';
const dashboardCardLabelPill = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'label--pill %LABEL%\']';
const dashboardCardLabelPillDelete = '//*[@data-testid=\'dashboard-card\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'label--pill--delete %LABEL%\']';
////*[@data-testid='dashboard-card'][.//*[text()='Test Dashboard']]//*[@data-testid='context-menu']
const addLabelsPopover = '[data-testid=\'inline-labels--popover\']';
const addLabelsPopoverLabel = '//*[@data-testid=\'inline-labels--popover--contents\']//*[contains(@data-testid,\'label--pill\')][text()=\'%LABEL%\']';
const addLabelsPopoverFilter = '[data-testid=\'inline-labels--popover-field\']';
const addLabelsLabelPills = '[data-testid^=\'label--pill\']';
const addLabelsPopoverListItem = '[data-testid^=\'label-list--item %ITEM%\']';
const addLabelsPopoverNewItem = '[data-testid^=\'inline-labels--create-new\']';
const importPopupUploadFileRadio = '[data-testid=overlay--body] [data-testid=select-group--option][title=\'Upload\']';
const importPopupPasteJSONRadio = '[data-testid=overlay--body] [data-testid=select-group--option][title=\'Paste\']';
const importPopupImportJSONButton = '[data-testid=\'overlay--footer\'] [title^=\'Import JSON\']';
const importPopupDismiss = '[data-testid=\'overlay--header\'] button';
const importPopupFileInput = '[data-testid=\'overlay--body\'] [class*=\'drag-and-drop--form\'] ';
const importPopupFileInputHeader = '[data-testid=\'overlay--body\'] [class*=\'drag-and-drop--header\']';
const importPopupDragNDropFile = 'input[type=file]'; //N.B. has display:none
const importPopupJSONTextarea = '[data-testid=\'overlay--body\'] [data-testid=\'import-overlay--textarea\']';
const fromTemplatePopupDismiss = '[data-testid=\'overlay--header\'] button';
const fromTemplatePopupCancel = '[data-testid=\'overlay--footer\'] [data-testid=\'button\'][title=\'Cancel\']';
const fromTemplatePopupCreateDBoard = '[data-testid=\'create-dashboard-button\']';
const fromTemplatePopupTemplateList = '//*[@data-testid=\'dapper-scrollbars\'][.//*[contains(@data-testid, \'template--\')]]';
const fromTemplatePopupTemplateItem = '[data-testid=\'template--%ITEM%\']';
const fromTemplatePopupTemplatePanel = '[data-testid=\'template-panel\']';
const fromTemplatePopupPreviewCell = '//*[@data-testid=\'template-panel\']//div[h5[text()=\'Cells\']]/p[text()=\'%NAME%\']';
const exportPopupDismiss = '[data-testid=\'overlay--header\'] [type=\'button\'][class*=dismiss]';
const exportPopupCodeMirror = '.CodeMirror';
const exportPopupDownloadJSON = '[data-testid=\'overlay--footer\'] [data-testid=\'button\'][title=\'Download JSON\']';
const exportPopupSaveAsTemplate = '[data-testid=\'overlay--footer\'] [data-testid=\'button\'][title=\'Save as template\']';
const exportPopupCopyToClipboard = '[data-testid=\'overlay--footer\'] [data-testid=\'button-copy\']';
const urlCtx = 'dashboards';
class dashboardsPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: createDashboardDropdown},
{type: 'css', selector: filterDashboards} ,
{type: 'css', selector: sortTypeButton}
// {type: 'css', selector: modifiedSortButton}
], urlCtx);
}
async getCreateDashboardDropdown(){
return await this.driver.findElement(By.css(createDashboardDropdown));
}
async getFilterDashboards(){
return await this.driver.findElement(By.css(filterDashboards));
}
async getSortTypeButton(){
return await this.driver.findElement(By.css(sortTypeButton));
}
async getSortTypeItem(item){
return await this.driver.findElement(By.css(sortTypeItem.replace('%ITEM%', item)));
}
// async getModifiedSortButton(){
// return await this.driver.findElement(By.css(modifiedSortButton));
// }
async getCreateDashboardItem(item){
return await this.driver.findElement(By.css(`[data-testid^=add-resource-dropdown--][id='${item}']`));
}
async getCreateDashboardDropdownEmpty(){
return await this.driver.findElement(By.css(createDashboardDropdownEmpty));
}
static getCreateDashboardDropdownEmptySelector(){
return { type: 'css', selector: createDashboardDropdownEmpty};
}
async getCreateDashboardItems(){
return await this.driver.findElements(By.css(createDashboardItems));
}
async getDashboardCardByName(name){
return await this.driver.findElement(By.xpath(dashboardCardByName.replace('%NAME%', name)));
}
static getDashboardCardSelectorByName(name){
return { type: 'xpath', selector: dashboardCardByName.replace('%NAME%', name) };
}
async getDashboardCardExportButton(name){
return await this.driver.findElement(By.xpath(dashboardCardExportButton.replace('%NAME%', name)));
}
static getDashboardCardExportButtonSelector(name){
return { type: 'xpath', selector: dashboardCardExportButton.replace('%NAME%', name)};
}
async getDashboardCardExportConfirm(name){
return await this.driver.findElement(By.xpath(dashboardCardExportConfirm.replace('%NAME%', name)));
}
async getDashboardCardCloneButton(name){
return await this.driver.findElement(By.xpath(dashboardCardCloneButton.replace('%NAME%', name)));
}
static getDashboardCardCloneButtonSelector(name){
return { type: 'xpath', selector: dashboardCardCloneButton.replace('%NAME%', name)};
}
async getDashboardCardDeleteButton(name){
return await this.driver.findElement(By.xpath(dashboardCardDeleteButton.replace('%NAME%', name)));
}
static getDashboardCardDeleteButtonSelector(name){
return { type: 'xpath', selector: dashboardCardDeleteButton.replace('%NAME%', name)};
}
async getDashboardCardName(name){
return await this.driver.findElement(By.xpath(dashboardCardName.replace('%NAME%', name)));
}
async getDashboardCardNameButton(name){
return await this.driver.findElement(By.xpath(dashboardCardNameButton.replace('%NAME%', name)));
}
async getDashboardCardNameInput(name){
return await this.driver.findElement(By.xpath(dashboardCardNameInput.replace('%NAME%', name)));
}
async getDashboardCardDescription(name){
return await this.driver.findElement(By.xpath(dashboardCardDescription.replace('%NAME%', name)));
}
async getDashboardCardDescriptionEdit(name){
return await this.driver.findElement(By.xpath(dashboardCardDescriptionEdit.replace('%NAME%', name)));
}
async getDashboardCardDescriptionInput(name){
return await this.driver.findElement(By.xpath(dashboardCardDescriptionInput.replace('%NAME%', name)));
}
async getDashboardCardLabelsEmpty(name){
return await this.driver.findElement(By.xpath(dashboardCardLabelsEmpty.replace('%NAME%', name)));
}
async getDashboardCardAddLabels(name){
return await this.driver.findElement(By.xpath(dashboardCardAddLabels.replace('%NAME%', name)));
}
async getAddLabelsPopoverLabel(label){
return await this.driver.findElement(By.xpath(addLabelsPopoverLabel.replace('%LABEL%', label)));
}
static getAddLabelsPopoverLabelSelector(label){
return { type: 'xpath', selector: addLabelsPopoverLabel.replace('%LABEL%', label)};
}
async getAddLabelsPopoverFilter(){
return await this.driver.findElement(By.css(addLabelsPopoverFilter));
}
async getAddLabelsLabelPills(){
return await this.driver.findElements(By.css(addLabelsLabelPills));
}
async getAddLabelsPopoverListItem(item){
return await this.driver.findElement(By.css(addLabelsPopoverListItem.replace('%ITEM%', item)));
}
async getAddLabelsPopoverNewItem(){
return await this.driver.findElement(By.css(addLabelsPopoverNewItem));
}
static getAddLabelsPopoverNewItemSelector(){
return { type: 'css', selector: addLabelsPopoverNewItem };
}
async getDashboardCardLabelPill(name, label){
return await this.driver.findElement(By.xpath(dashboardCardLabelPill
.replace('%NAME%', name).replace('%LABEL%', label)));
}
static getDashboardCardLabelPillSelector(name, label){
return { type: 'xpath', selector: dashboardCardLabelPill
.replace('%NAME%', name).replace('%LABEL%', label) };
}
async getAddLabelsPopover(){
return await this.driver.findElement(By.css(addLabelsPopover));
}
static getAddLabelsPopoverSelector(){
return { type: 'css', selector: addLabelsPopover};
}
async getDashboardCardLabelPillDelete(name, label){
return await this.driver.findElement(By.xpath(dashboardCardLabelPillDelete
.replace('%NAME%', name).replace('%LABEL%', label)));
}
async getImportPopupUploadFileRadio(){
return await this.driver.findElement(By.css(importPopupUploadFileRadio));
}
async getImportPopupPasteJSONRadio(){
return await this.driver.findElement(By.css(importPopupPasteJSONRadio));
}
async getImportPopupImportJSONButton(){
return await this.driver.findElement(By.css(importPopupImportJSONButton));
}
async getImportPopupDismiss(){
return await this.driver.findElement(By.css(importPopupDismiss));
}
async getImportPopupFileInput(){
return await this.driver.findElement(By.css(importPopupFileInput));
}
static getImportPopupFileInputSelector(){
return { type: 'css', selector: importPopupFileInput };
}
async getImportPopupFileInputHeader(){
return await this.driver.findElement(By.css(importPopupFileInputHeader));
}
async getImportPopupDragNDropFile(){
return await this.driver.findElement(By.css(importPopupDragNDropFile));
}
async getImportPopupJSONTextarea(){
return await this.driver.findElement(By.css(importPopupJSONTextarea));
}
async getFromTemplatePopupDismiss(){
return await this.driver.findElement(By.css(fromTemplatePopupDismiss));
}
async getFromTemplatePopupCancel(){
return await this.driver.findElement(By.css(fromTemplatePopupCancel));
}
async getFromTemplatePopupCreateDBoard(){
return await this.driver.findElement(By.css(fromTemplatePopupCreateDBoard));
}
async getFromTemplatePopupTemplateList(){
return await this.driver.findElement(By.xpath(fromTemplatePopupTemplateList));
}
async getFromTemplatePopupTemplateItem(item){
return await this.driver.findElement(By.css(fromTemplatePopupTemplateItem.replace('%ITEM%', item)));
}
async getFromTemplatePopupTemplatePanel(){
return await this.driver.findElement(By.css(fromTemplatePopupTemplatePanel));
}
async getfromTemplatePopupPreviewCell(name){
return await this.driver.findElement(By.xpath(fromTemplatePopupPreviewCell.replace('%NAME%', name)));
}
async getDashboardCardNames(){
return await this.driver.findElements(By.css(dashboardCardNames));
}
async getDashboardCardDeleteConfirm(name){
return await this.driver.findElement(By.xpath(dashboardCardDeleteConfirm.replace('%NAME%', name)));
}
async getDashboardCardCloneConfirm(name){
return await this.driver.findElement(By.xpath(dashboardCardCloneConfirm.replace('%NAME%', name)));
}
async getExportPopupDismiss(){
return await this.driver.findElement(By.css(exportPopupDismiss));
}
async getExportPopupCodeMirror(){
return await this.driver.findElement(By.css(exportPopupCodeMirror));
}
async getExportPopupDownloadJSON(){
return await this.driver.findElement(By.css(exportPopupDownloadJSON));
}
async getExportPopupSaveAsTemplate(){
return await this.driver.findElement(By.css(exportPopupSaveAsTemplate));
}
async getexportPopupCopyToClipboard(){
return await this.driver.findElement(By.css(exportPopupCopyToClipboard));
}
}
module.exports = dashboardsPage;

View File

@ -1,301 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const timeLocaleDropdown = '[data-testid=select-dropdown]';
const graphTypeDropdodwn = '[data-testid=page-control-bar--left] [data-testid=view-type--dropdown]';
const customizeGraphButton = '[data-testid=page-control-bar--left] [data-testid=cog-cell--button]';
const saveAsButton = '//button[./span[text() = \'Save As\']]';
const viewArea = '.time-machine--view';
const viewRawToggle = '[data-testid=raw-data--toggle]';
const autorefreshDropdown = 'div.autorefresh-dropdown';
//const pausedAutorefreshButton = 'button.autorefresh-dropdown--pause'; //Present only when autorefresh is paused - not good candidate for page loade check
const timeRangeDropdown = '//*[@data-testid=\'flex-box\']/div[3]';
//const scriptEditToggle = '[data-testid=switch-to-script-editor] '; //N.B. disappears when in Script edit mode - not good candidate for page load check
//const queryBuildToggle = '[data-testid=switch-to-query-builder]'; //N.B. not present when in Query builder mode - not good candidate for page load check
const submitQueryButton = '[data-testid=time-machine-submit-button]';
const bucketSelector = '[data-testid=bucket-selector]';
const builderCard = '[data-testid=builder-card]';
const graphCanvas = '[data-testid^=giraffe-layer]';
const cellCanvasLine = '//*[contains(@class, \' cell \')][.//*[text()=\'%NAME%\']]//*[@data-testid=\'giraffe-layer-line\']';
const graphHoverLine = '[data-testid=giraffe-layer-hover-line]';
const canvasAxes = '//*[@data-testid=\'giraffe-axes\']'; //'[@data-testid=\'giraffe-axes\']';
const refreshGraphButton = '//*[@class=\'autorefresh-dropdown--pause\'][@data-testid=\'square-button\']'; '//*[@class=\'cell--header\'][./*[text()=\'%NAME%\']]';
const refreshDropdownPaused = '//*[@class=\'autorefresh-dropdown paused\'][.//*[@data-testid=\'dropdown\']]';
const refreshDropdownActive = '//*[@class=\'autorefresh-dropdown\'][.//*[@data-testid=\'dropdown\']]';
const refreshDropdownItem = '[id=\'auto-refresh-%ITEM%\']'; //'//*[@data-testid=\'dropdown-menu--contents\'][.//*[text()=\'%ITEM%\']]'; //*[contains(@class, ' cell ')][. '//*[id=\'auto-refresh-%ITEM%\'][@data-testid=\'dropdown-item\']';
const addQueryButton = '[class=time-machine-queries--tabs] [data-testid=square-button]';
const queryTabByName = '//*[contains(@class,\'query-tab\')][./*[text()=\'%NAME%\']]';
const queryTabMenuItem = '//*[@data-testid=\'right-click--%ITEM%-tab\']';
const queryTabNameInput = '//*[contains(@class,\'query-tab__active\')][.//*[contains(@class,\'cf-input-xs\')]]';
const scriptEditorButton = '[data-testid=switch-to-script-editor]';
const scriptMonacoEditor = '.inputarea';
const viewTypeDropdown = '[data-testid=page-control-bar--left] [data-testid=\'view-type--dropdown\']';
const viewType = '//*[@class=\'cf-dropdown-item--children\'][.//*[text()=\'%TYPE%\']]';
const singleStatText = '[data-testid=single-stat--text]';
const rawDataToggle = '[data-testid=raw-data--toggle]';
const rawDataTable = '[data-testid=raw-data-table]';
const functionSearchInput = '//*[@data-testid=\'function-selector\'][.//*[contains(@class,\'tag-selector--search\')]]';
const saveAsOverlayHeader = '[data-testid=save-as-overlay--header]';
const targetDashboardDropdown = '[data-testid=save-as-dashboard-cell--dropdown]';
const targetDashboardDropdownItem = '[data-testid=save-as-dashboard-cell--create-new-dash]';
const newDashboardNameInput = '[data-testid=save-as-dashboard-cell--dashboard-name]';
const cellNameInput = '[data-testid=save-as-dashboard-cell--cell-name]';
const saveAsDashboardCellButton = '[data-testid=save-as-dashboard-cell--submit]';
const saveAsPopupTabCell = '[data-testid=\'cell-radio-button\']';
const saveAsPopupTabTask = '[data-testid=\'task--radio-button\']';
const saveAsPopupTabVar = '[data-testid=\'variable-radio-button\']';
const taskNameInput = '[data-testid=\'task-form-name\']';
const taskIntervalInput = '[data-testid=\'task-form-schedule-input\']';
const taskOffsetInput = '[data-testid=\'task-form-offset-input\']';
const saveAsTaskButton = '[data-testid=task-form-save]';
const variableNameInput = '[data-testid=\'input-field\'][placeholder=\'Give your variable a name\']';
const saveAsVariableButton = '//*[@data-testid=\'button\'][.//*[text()=\'Save as Variable\']]';
//TODO - more controls
const urlCtx = 'data-explorer';
class dataExplorerPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: timeLocaleDropdown},
{type: 'css', selector: graphTypeDropdodwn},
{type: 'css', selector: customizeGraphButton},
{type: 'xpath', selector: saveAsButton},
{type: 'css', selector: viewArea},
{type: 'css', selector: viewRawToggle},
{type: 'css', selector: autorefreshDropdown},
{type: 'xpath', selector: timeRangeDropdown},
{type: 'css', selector: submitQueryButton}
], urlCtx);
}
async getTimeLocaleDropdown(){
return await this.driver.findElement(By.css(timeLocaleDropdown));
}
async getGraphTypeDropdown(){
return await this.driver.findElement(By.css(graphTypeDropdodwn));
}
async getCustomizeGraphButton(){
return await this.driver.findElement(By.css(customizeGraphButton));
}
async getSaveAsButton(){
return await this.driver.findElement(By.xpath(saveAsButton));
}
async getViewArea(){
return await this.driver.findElement(By.css(viewArea));
}
async getViewRawToggle(){
return await this.driver.findElement(By.css(viewRawToggle));
}
async getAutoRefreshDropdown(){
return await this.driver.findElement(By.css(autorefreshDropdown));
}
async getTimeRangeDropdown(){
return await this.driver.findElement(By.xpath(timeRangeDropdown));
}
async getSubmitQueryButton(){
return await this.driver.findElement(By.css(submitQueryButton));
}
async getBucketSelector(){
return await this.driver.findElement(By.css(bucketSelector));
}
async getItemFromSelectorList(bucket){
return await this.driver.findElement(By.css(`[data-testid='selector-list ${bucket}']`));
}
async getBuilderCard(){
return await this.driver.findElements(By.css(builderCard));
}
async getBuilderCardByIndex(index){
return (await this.driver.findElements(By.css(builderCard)))[index - 1];
}
async getGraphCanvas(){
return await this.driver.findElement(By.css(graphCanvas));
}
async getCanvasLine(){
return await this.driver.findElement(By.css(graphCanvas));
}
async getGraphHoverLine(){
return await this.driver.findElement(By.css(graphHoverLine));
}
async getCanvasAxes(){
return await this.driver.findElement(By.xpath(canvasAxes));
}
async getRefreshGraphButton(){
return await this.driver.findElement(By.xpath(refreshGraphButton));
}
async getRefreshDropdownPaused(){
return await this.driver.findElement(By.xpath(refreshDropdownPaused));
}
async getRefreshDropdownActive(){
return await this.driver.findElement(By.xpath(refreshDropdownActive));
}
//async getRefreshDropdownItem(item){
// return await this.driver.findElement(By.css(`[data-testid='dropdown-item'][id='auto-refresh-${item}']`));
//}
async getRefreshDropdownItem(item){
return await this.driver.findElement(By.css(refreshDropdownItem.replace('%ITEM%', item)));
}
async getAddQueryButton(){
return await this.driver.findElement(By.css(addQueryButton));
}
async getQueryTabByName(name){
return await this.driver.findElement(By.xpath(queryTabByName.replace('%NAME%', name)));
}
async getQueryTabMenuItem(item){
return await this.driver.findElement(By.xpath(queryTabMenuItem.replace('%ITEM%', item)));
}
async getQueryTabNameInput(){
return await this.driver.findElement(By.xpath(queryTabNameInput));
}
async getScriptEditorButton(){
return await this.driver.findElement(By.css(scriptEditorButton));
}
async getScriptMonacoEditor(){
return await this.driver.findElement(By.css(scriptMonacoEditor));
}
async getViewTypeDropdown(){
return await this.driver.findElement(By.css(viewTypeDropdown));
}
async getViewType(type){
return await this.driver.findElement(By.xpath(viewType.replace('%TYPE%', type)));
}
async getSingleStatText(){
return await this.driver.findElement(By.css(singleStatText));
}
async getRawDataToggle(){
return await this.driver.findElement(By.css(rawDataToggle));
}
async getRawDataTable(){
return await this.driver.findElement(By.css(rawDataTable));
}
async getTimeRangeDropdownItem(item){
return await this.driver.findElement(By.css(`[data-testid='dropdown-item-past${item}']`));
}
async getFunctionSearchInput(){
return await this.driver.findElement(By.xpath(functionSearchInput));
}
async getSelectorListFunction(funct){
return await this.driver.findElement(By.css(`[data-testid='selector-list ${funct}']`));
}
async getSaveAsOverlayHeader(){
return await this.driver.findElement(By.css(saveAsOverlayHeader));
}
async getTargetDashboardDropdown(){
return await this.driver.findElement(By.css(targetDashboardDropdown));
}
async getTargetDashboardDropdownItem(){
return await this.driver.findElement(By.css(targetDashboardDropdownItem));
}
async getNewDashboardNameInput(){
return await this.driver.findElement(By.css(newDashboardNameInput));
}
async getCellNameInput(){
return await this.driver.findElement(By.css(cellNameInput));
}
async getSaveAsDashboardCellButton(){
return await this.driver.findElement(By.css(saveAsDashboardCellButton));
}
async getSaveAsPopupTabCell(){
return await this.driver.findElement(By.css(saveAsPopupTabCell));
}
async getSaveAsPopupTabTask(){
return await this.driver.findElement(By.css(saveAsPopupTabTask));
}
async getSaveAsPopupTabVar(){
return await this.driver.findElement(By.css(saveAsPopupTabVar));
}
async getTaskNameInput(){
return await this.driver.findElement(By.css(taskNameInput));
}
async getTaskIntervalInput(){
return await this.driver.findElement(By.css(taskIntervalInput));
}
async getTaskOffsetInput(){
return await this.driver.findElement(By.css(taskOffsetInput));
}
async getSaveAsTaskButton(){
return await this.driver.findElement(By.css(saveAsTaskButton));
}
async getVariableNameInput(){
return await this.driver.findElement(By.css(variableNameInput));
}
async getSaveAsVariableButton(){
return await this.driver.findElement(By.xpath(saveAsVariableButton));
}
//TODO - more element getters
}
module.exports = dataExplorerPage;

View File

@ -1,88 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const logoutButton = '[title=Logout]';
const getStartedDataCollect = '//*[@data-testid=\'panel\'][./div[contains(@class, \'getting-started\')]][.//span[text()=\'Load your data\']]';
const getStartedDashboard = '//*[@data-testid=\'panel\'][./div[contains(@class, \'getting-started\')]][.//span[text()=\'Build a dashboard\']]';
const getStartedAlerting = '//*[@data-testid=\'panel\'][./div[contains(@class, \'getting-started\')]][.//span[text()=\'Set up alerting\']]';
const dataCollectButton = '[data-testid=button][title=\'Load your data\']';
const dashboardButton = '[data-testid=button][title=\'Build a dashboard\']';
const alertingButton = '[data-testid=button][title=\'Set up alerting\']';
const tutorialsList = '//ul[contains(@class, \'tutorials\')]';
const dashboardsList = '//*[./div/*[text()=\'Recent Dashboards\']]';
const usefulLinkList = '//div[contains(@class,\'cf-col-sm-4 cf-col-md-3\')]//div[@data-testid=\'panel\'][3]//ul';
//const dashboardLink = '//*[@data-testid=\'panel\'][.//*[text()=\'Dashboards\']]//ul/li/a[text()=\'%TEXT%\']';
const dashboardLink = '//*[@data-testid=\'panel\'][.//*[text()=\'Recent Dashboards\']]//*[text()=\'%TEXT%\']'
// TODO - add selectors - especially for isLoaded below
class homePage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([//{type: 'css', selector: logoutButton},
{type: 'xpath', selector: getStartedDataCollect},
{type: 'xpath', selector: getStartedDashboard},
{type: 'xpath', selector: getStartedAlerting},
{type: 'xpath', selector: tutorialsList},
{type: 'xpath', selector: usefulLinkList},
]);
}
async getLogoutButton(){
return await this.driver.findElement(By.css(logoutButton));
}
async getGetStartedDataCollect(){
return await this.driver.findElement(By.xpath(getStartedDataCollect));
}
async getGetStartedDashboard(){
return await this.driver.findElement(By.xpath(getStartedDashboard));
}
async getGetStartedAlerting(){
return await this.driver.findElement(By.xpath(getStartedAlerting));
}
async getTutorialsList(){
return await this.driver.findElement(By.xpath(tutorialsList));
}
async getUsefulLinksList(){
return await this.driver.findElement(By.xpath(usefulLinkList));
}
async getTutorialLinkByText(text){
return await this.driver.findElement(By.xpath(`${tutorialsList}//a[text() = '${text}']`));
}
async getUsefulLinkByText(text){
return await this.driver.findElement(By.xpath(`${usefulLinkList}//a[contains(text(), '${text}')]`));
}
async getDashboardsList(){
return await this.driver.findElement(By.xpath(dashboardsList));
}
async getDataCollectButton(){
return await this.driver.findElement(By.css(dataCollectButton));
}
async getDashboardButton(){
return await this.driver.findElement(By.css(dashboardButton));
}
async getAlertingButton(){
return await this.driver.findElement(By.css(alertingButton));
}
async getDashboardLink(text){
return await this.driver.findElement(By.xpath(dashboardLink.replace('%TEXT%', text)));
}
}
module.exports = homePage;

View File

@ -1,167 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By } = require('selenium-webdriver');
const navMenu = '[data-testid=tree-nav]';
const navMenuHome = '[data-testid=tree-nav--header]';
const navMenuDExplorer = '[data-testid=nav-item-data-explorer]';
const navMenuDashboards = '[data-testid=nav-item-dashboards]';
const navMenuTasks = '[data-testid=nav-item-tasks]';
const navMenuAlerting = '[data-testid=nav-item-alerting]'; //N.B. only available with alerting on
const navMenuLoadData = '[data-testid=nav-item-load-data]';
const navMenuSettings = '[data-testid=nav-item-settings]';
//const navMenuFeedback = '[data-testid=nav-menu--item] span.nav-chat';
const navMenuUser = '[data-testid=user-nav]';
const navMenuOrg = '[data-testid=nav-item-org]';
const navMenuHomeHeading = '//a[text() = \'admin (qa)\']';
const navMenuHomeNewOrg = 'a.cf-nav--sub-item[href=\'/orgs/new\']';
const navMenuHomeLogout = 'a.cf-nav--sub-item[href=\'/logout\']';
const navMenuXpath = '//*[@data-testid = \'nav-menu\']';
const userMenuItemXpath = '//*[@data-testid = \'user-nav\']';
const userMenuItem = '[data-testid^=\'user-nav-item-%ITEM%\']';
const pageHeader = '[data-testid=page-header]';
const urlCtx = 'orgs';
class influxPage extends basePage {
constructor(driver){
super(driver);
}
async getNavMenu(){
return await this.driver.findElement(By.css(navMenu));
}
async getPageHeader(page = ''){
if(page !== ''){
return await this.driver.findElement(By.css( `[data-testid=${page.toLowerCase()}--header]`))
}
return await this.driver.findElement(By.css(pageHeader));
}
/*
async isLoaded(){
await super.isLoaded([{type:'css', selector:navMenu}], urlCtx)
}*/
//N.B. Method overloading not supported in JS - however this page is extended
async isLoaded(selectors = undefined, url = undefined){
if(!selectors){
await super.isLoaded([{type:'css', selector:navMenu},
{type: 'css', selector: navMenuHome},
{type: 'css', selector: navMenuDExplorer},
{type: 'css', selector: navMenuDashboards},
{type: 'css', selector: navMenuTasks},
//{type: 'css', selector: navMenuAlerting}, //N.B. only available with alerting on
{type: 'css', selector: navMenuLoadData},
{type: 'css', selector: navMenuSettings},
{type: 'css', selector: navMenuUser}
// {type: 'css', selector: navMenuOrg}, // TODO - reactivate when certain orgs should be in menu
//TODO - reactivate when pages are stable
// {type: 'css', selector: pageHeader} // 1.7.20 - some pages no longer use generic header e.g. LoadData
], urlCtx);
return;
}
if(url){
await super.isLoaded(selectors.concat([{type: 'css', selector: navMenu}]), url);
// TODO - reactivate when page header refactoring finished
// {type: 'css', selector: pageHeader}]),url); // 1.7.20 - some pages no longer use generic header
}else{
await super.isLoaded(selectors.concat([{type: 'css', selector: navMenu}]), url);
// TODO - reactivate when page header refactoring finished
//{type: 'css', selector: pageHeader}]), urlCtx); // 1.7.20 - some pages no longer use generic header
}
}
async getMenuHome(){
return await this.driver.findElement(By.css(navMenuHome));
}
async getMenuExplorer(){
return await this.driver.findElement(By.css(navMenuDExplorer));
}
async getMenuDashboards(){
return await this.driver.findElement(By.css(navMenuDashboards));
}
async getMenuTasks(){
return await this.driver.findElement(By.css(navMenuTasks));
}
/* N.B. only available with alerting enabled
async getMenuAlerting(){
return await this.driver.findElement(By.css(navMenuAlerting));
}
*/
async getMenuLoadData(){
return await this.driver.findElement(By.css(navMenuLoadData));
}
async getMenuSettings(){
return await this.driver.findElement(By.css(navMenuSettings));
}
async getMenuFeedback(){
return await this.driver.findElement(By.css(navMenuFeedback));
}
async getMenuHomeHeading(){
return await this.driver.findElement(By.xpath(navMenuHomeHeading));
}
async getMenuHomeNewOrg(){
return await this.driver.findElement(By.css(navMenuHomeNewOrg));
}
async getMenuHomeLogout(){
return await this.driver.findElement(By.css(navMenuHomeLogout));
}
async getNavMenuAlerting(){
return await this.driver.findElement(By.css(navMenuAlerting));
}
async getSubItemByText(text){
return await this.driver.findElement(By.xpath(navMenuXpath + `//*[text() = '${text}']`));
}
async getSubItemContainingText(text){
return await this.driver.findElement(By.xpath(navMenuXpath + `//*[contains(text(), '${text}')]`));
}
async getNavMenuUser(){
return await this.driver.findElement(By.css(navMenuUser));
}
async getNavMenuOrg(){
return await this.driver.findElement(By.css(navMenuOrg));
}
async getUserMenuSwitchOrg(){
return await this.driver.findElement(By.xpath( `${userMenuItemXpath}[text() = 'Switch Organizations']`));
}
async getUserMenuCreateOrg(){
return await this.driver.findElement(By.xpath(`${userMenuItemXpath}[text() = 'Create Organization']`));
}
async getUserMenuLogout(){
return await this.driver.findElement(By.xpath(`${userMenuItemXpath}[text() = 'Logout']`));
}
async getUserMenuItem(item){
return await this.driver.findElement(By.css(userMenuItem.replace('%ITEM%', item.toLowerCase())));
}
}
module.exports = influxPage;

View File

@ -1,339 +0,0 @@
const loadDataPage = require(__srcdir + '/pages/loadData/loadDataPage.js');
const { By } = require('selenium-webdriver');
const bucketCards = '[data-testid^=\'bucket--card \']';
const createBucketBtn = 'button[data-testid=\'Create Bucket\']';
const filterInput = '[data-testid=search-widget]';
const nameSorter = '[data-testid=\'name-sorter\']';
const policySorter = '[data-testid=\'retention-sorter\']';
const bucketCardByName = '[data-testid=\'bucket--card--name %NAME%\']';
const bucketCardSettingsByName = `[data-testid='bucket-card %NAME%'] [data-testid=bucket-settings]`
// Create Bucket Popup
const popupContainer = '[data-testid=overlay--container]';
const popupTitle = '[data-testid=overlay--header] div';
const popupInputName = '[data-testid=bucket-form-name]';
const popupRetentionNever = '[data-testid=retention-never--button]';
const popupRetentionIntervals = '[data-testid=retention-intervals--button]';
const popupCancelButton = '[data-testid=overlay--body] button[title=Cancel]';
const popupDismissButton = '[data-testid=overlay--header] button[class*=dismiss]';
const popupCreateButton = '[data-testid=overlay--body] button[title*=Create]';
const popupRPIntervalControls = '[data-testid=form--element] [data-testid=grid--row]';
const popupRPDurationSelectorButton = '[data-testid=duration-selector--button]';
const popupRPDaysInput = popupRPIntervalControls + ' [data-testid=grid--column]:nth-of-type(1) input';
const popupRPHoursInput = popupRPIntervalControls + ' [data-testid=grid--column]:nth-of-type(2) input';
const popupRPMinutesInput = popupRPIntervalControls + ' [data-testid=grid--column]:nth-of-type(3) input';
const popupRPSecondsInput = popupRPIntervalControls + ' [data-testid=grid--column]:nth-of-type(4) input';
const popupFormError = '[data-testid=form--element-error]';
//Edit Bucket Popup
const popupSaveChanges = '[data-testid=bucket-form-submit]';
const popupHelpText = '[data-testid=form--help-text]';
//Add data line protocol Popup Wizard
//reuse popup title above
//reuse dismiss above
const wizardStepTitle = '.cf-overlay--title';
const wizardStepSubTitle = '[data-testid=form-container] [class*=sub-title]';
const wizardRadioUploadFile = '[data-testid=\'Upload File\']';
const wizardRadioManual = '[data-testid=\'Enter Manually\']';
const wizardPrecisionDropdown = '[data-testid=\'wizard-step--lp-precision--dropdown\']';
const wizardDragAndDrop = 'div.drag-and-drop';
const wizardContinueButton = '[data-testid=next]';
const wizardWriteDataButton = '[data-testid*=\'write-data--button\']';
const wizardTextArea = '[data-testid=\'line-protocol--text-area\']';
const wizardFinishButton = '[data-testid=next][title=\'Finish\']';
const wizardCloseButton = '[data-testid=lp-close--button]';
const wizardCancelButton = '[data-testid^=lp-cancel--button]';
const wizardDismissButton = '.cf-overlay--dismiss';
const wizardStepStateText = '[data-testid=\'line-protocol--status\']';
const wizardSparkleSpinner = '[data-testid=sparkle-spinner]';
const dataWizardPreviousButton = '[data-testid=overlay--footer] [data-testid=back]';
const popoverItem = '//*[@data-testid=\'popover--contents\']//*[text() = \'%ITEM%\']';
const urlCtx = 'buckets';
class bucketsTab extends loadDataPage {
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx);
}
async getBucketCards(){
return await this.driver.findElements(By.css(bucketCards));
}
async getCreateBucketBtn(){
return await this.driver.findElement(By.css(createBucketBtn));
}
async getFilterInput(){
return await this.driver.findElement(By.css(filterInput));
}
async getNameSorter(){
return await this.driver.findElement(By.css(nameSorter));
}
static async getNameSorterSelector(){
return {type: 'css', selector: nameSorter};
}
async getPolicySorter(){
return await this.driver.findElement(By.css(policySorter));
}
//Create Bucket Popup
async getPopupContainer(){
return await this.driver.findElement(By.css(popupContainer));
}
static getPopupContainerSelector(){
return { type: 'css', selector: popupContainer };
}
async getPopupTitle(){
return await this.driver.findElement(By.css(popupTitle));
}
static getPopupTitleSelector(){
return { type: 'css', selector: popupTitle};
}
async getPopupInputName(){
return await this.driver.findElement(By.css(popupInputName));
}
async getPopupRetentionNever(){
return await this.driver.findElement(By.css(popupRetentionNever));
}
async getPopupRetentionIntervals(){
return await this.driver.findElement(By.css(popupRetentionIntervals));
}
async getPopupCancelButton(){
return await this.driver.findElement(By.css(popupCancelButton));
}
async getPopupRPIntevalControls(){
return await this.driver.findElement(By.css(popupRPIntervalControls));
}
static getPopupRPIntervalControlsSelector(){
return { type: 'css', selector: popupRPIntervalControls };
}
async getPopupRPDurationSelectorButton(){
return await this.driver.findElement(By.css(popupRPDurationSelectorButton));
}
static getPopupRPDurationSelectorButtonSelector(){
return {type: 'css', selector: popupRPDurationSelectorButton};
}
async getPopupRPDaysInput(){
return await this.driver.findElement(By.css(popupRPDaysInput));
}
async getPopupRPHoursInput(){
return await this.driver.findElement(By.css(popupRPHoursInput));
}
async getPopupRPMinutesInput(){
return await this.driver.findElement(By.css(popupRPMinutesInput));
}
async getPopupRPSecondsInput(){
return await this.driver.findElement(By.css(popupRPSecondsInput));
}
async getPopupFormError(){
return await this.driver.findElement(By.css(popupFormError));
}
static getPopupFormErrorSelector(){
return { type: 'css', selector: popupFormError };
}
async getPopupDismissButton(){
//return await this.driver.findElement(By.css(popupDismissButton));
return await this.smartGetElement({type: 'css', selector: popupDismissButton});
}
static async getPopupDismissButtonSelector(){
return popupDismissButton;
}
async getPopupRPDurationSelectorItem(duration){
return await this.driver.findElement(By.css(`[data-testid=duration-selector--${duration}]`));
}
async getPopupHelpText(){
return await this.driver.findElement(By.css(popupHelpText));
}
async getPopupCreateButton(){
return await this.driver.findElement(By.css(popupCreateButton));
}
//get just the name link
async getBucketCardName(name){
return await this.driver.findElement(By.css(`[data-testid='bucket--card--name ${name}']`));
}
//get the whole card
async getBucketCardByName(name){
return await this.driver.findElement(By.css(bucketCardByName.replace('%NAME%', name)));
//return await this.driver.findElement(By.xpath(`//div[div/div[@data-testid='bucket--card ${name}']]`));
}
static async getBucketCardDeleteSelectorByName(name){
return {type: 'xpath', selector: `//div[div/div/div[@data-testid='bucket--card ${name}'] ]//*[@data-testid='context-delete-menu']`};
}
async getBucketCardDeleteByName(name){
// return await this.driver.findElement(By.xpath(`//div[div/div/div[@data-testid='bucket--card ${name}'] ]//*[@data-testid='context-delete-menu']`));
return await this.driver.findElement(By.css(`[data-testid='context-delete-menu ${name}']`));
}
async getBucketCardRetentionByName(name){
// return await this.driver.findElement(By.xpath(`//div[div/div[@data-testid='bucket--card ${name}']]//div[contains(text(), 'Retention')]`));
//return await this.driver.findElement(By.xpath(`//*[@data-testid='bucket--card ${name}']//*[@data-testid='cf-resource-card--meta-item'][contains(text(),"Retention")]`));
//return await this.driver.findElement(By.xpath(`//*[@data-testid='bucket-card'][.//*[@data-testid='bucket--card--name ${name}']]//*[@data-testid='cf-resource-card--meta-item'][contains(text(), 'Retention')]`));
return await this.driver.findElement(By.xpath(`//*[@data-testid='bucket-card ${name}']//*[@data-testid='resource-list--meta']//*[contains(text(), 'Retention')]`));
}
async getBucketCardPopover(){
//return await this.driver.findElement(By.xpath(`//div[div/div[@data-testid='bucket--card ${name}']]//div[@data-testid='popover--contents']`));
return await this.driver.findElement(By.css('[data-testid=popover--contents]'));
}
static async getPopoverSelector(){
return { type: 'css', selector: '[data-testid=popover--contents]'};
}
async getBucketCardPopoverItemByName(name, item){
return await this.driver.findElement(By.xpath(`//div[div/div[@data-testid='bucket--card ${name}']]//div[@data-testid='popover--contents']//div[contains(text(), '${item}')]`));
}
static async getBucketCardSelectorByName(name){
return {type: 'css', selector: `[data-testid='bucket--card ${name}']`};
}
async getBucketCardDeleteConfirmByName(name){
//return await this.smartGetElement({type: 'xpath', selector: `//div[div/div/div[@data-testid='bucket--card ${name}'] ]//*[@data-testid='context-delete-menu']/..//button[text() = 'Confirm']`});
//return await this.driver.findElement(By.xpath(`//div[div/div/div[@data-testid='bucket--card ${name}'] ]//*[@data-testid='context-delete-menu']/..//button[text() = 'Confirm']`));
return await this.driver.findElement(By.css(`[data-testid='context-delete-bucket ${name}'] `));
}
async getBucketCardAddDataByName(name){
//return await this.driver.findElement(By.xpath(`//*[@data-testid='bucket-card'][.//*[@data-testid='bucket--card--name ${name}']]//button[@title='Add Data']`));
return await this.driver.findElement(By.xpath(`//*[@data-testid='bucket-card ${name}']//button[@title='Add Data']`))
//return await this.smartGetElement({type: 'xpath', selector: `//div[div/div/div[@data-testid='bucket--card ${name}']]//button[@title = 'Add Data']`});
}
async getPopupSaveChanges(){
return await this.driver.findElement(By.css(popupSaveChanges));
}
async getWizardStepTitle(){
return await this.driver.findElement(By.css(wizardStepTitle));
}
static async getWizardStepTitleSelector(){
return {type: 'css', selector: wizardStepTitle };
}
async getWizardStepSubTitle(){
return await this.driver.findElement(By.css(wizardStepSubTitle));
}
static async getWizardStepSubTitleSelector(){
return {type: 'css', selector: wizardStepSubTitle };
}
async getWizardRadioUploadFile(){
return await this.driver.findElement(By.css(wizardRadioUploadFile));
}
async getWizardRadioManual(){
return await this.driver.findElement(By.css(wizardRadioManual));
}
async getWizardPrecisionDropdown(){
return await this.driver.findElement(By.css(wizardPrecisionDropdown));
}
async getWizardDragAndDrop(){
return await this.driver.findElement(By.css(wizardDragAndDrop));
}
async getWizardContinueButton(){
return await this.driver.findElement(By.css(wizardContinueButton));
}
static async getWizardContinueButtonSelector(){
return {type: 'css', selector: wizardContinueButton };
}
async getWizardWriteDataButton(){
return await this.driver.findElement(By.css(wizardWriteDataButton));
}
async getWizardTextArea(){
return await this.driver.findElement(By.css(wizardTextArea));
}
async getWizardDropdownPrecisionItem(prec){
return await this.driver.findElement(By.css(`[data-testid='wizard-step--lp-precision-${prec}']`));
}
async getWizardFinishButton(){
return await this.driver.findElement(By.css(wizardFinishButton));
}
async getWizardCloseButton(){
return await this.driver.findElement(By.css(wizardCloseButton));
}
async getWizardCancelButton(){
return await this.driver.findElement(By.css(wizardCancelButton));
}
async getWizardDismissButton(){
return await this.driver.findElement(By.css(wizardDismissButton));
}
async getWizardStepStateText(){
return await this.driver.findElement(By.css(wizardStepStateText));
}
async getWizardSparkleSpinner(){
return await this.driver.findElement(By.css(wizardSparkleSpinner));
}
async getPopoverItem(item){
return await this.driver.findElement(By.xpath(popoverItem.replace('%ITEM%', item)));
}
async getDataWizardPreviousButton(){
return await this.driver.findElement(By.css(dataWizardPreviousButton));
}
async getBucketCardSettingsByName(name){
return await this.driver.findElement(By.css(bucketCardSettingsByName.replace('%NAME%', name)));
}
}
module.exports = bucketsTab;

View File

@ -1,43 +0,0 @@
const { By } = require('selenium-webdriver');
const loadDataPage = require(__srcdir + '/pages/loadData/loadDataPage.js');
const libTileByName = '[data-testid=\'client-libraries-cards--%NAME%\']';
const clientURL = '[data-testid=tabs--tab-contents] .code-snippet code';
const copy2ClipByLabel = '//*[text() = \'%LABEL%\']/following-sibling::div[1]//button';
const urlCtx = 'client-libraries';
class clientLibsTab extends loadDataPage {
constructor(driver) {
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: clientURL},
{type: 'css', selector: libTileByName.replace('%NAME%', 'csharp')},
{type: 'css', selector: libTileByName.replace('%NAME%', 'java')},
{type: 'css', selector: libTileByName.replace('%NAME%', 'python')},
]
);
}
async getLibTileByName(name){
return await this.driver.findElement(By.css(libTileByName.replace('%NAME%', name)));
}
async getClientURL(){
return await this.driver.findElement(By.css(clientURL));
}
async getCopy2ClipByLabel(label){
return await this.driver.findElement(By.xpath(copy2ClipByLabel.replace('%LABEL%', label)));
}
}
module.exports = clientLibsTab;

View File

@ -1,146 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const tabsCss = '[data-testid=tabs]';
const tabsXpath = '//*[@data-testid=\'tabs\']';
const pageTitle = '[data-testid=\'page-title\']';
const urlCtx = 'settings';
//Create Scraper Popup - accessible in both Scraper Page and base LoadData page - through buckets add data
const createScraperTitle = '[data-testid=overlay--header] [class*=title]';
const createScraperDismiss = '[data-testid=overlay--header] button';
const createScraperNameInput = '[data-testid=input-field][title=Name]';
const createScraperBucketDropdown = '[data-testid=bucket-dropdown--button]';
const createScraperUrlInput = '[data-testid=input-field][title*=URL]';
const createScraperCancel = '[data-testid=create-scraper--cancel]';
const createScraperSubmit = '[data-testid=create-scraper--submit]';
const createScraperBucketDropdownItems = '[data-testid=bucket-dropdown] [data-testid=dropdown-item]';
//Create Telegraf Config Wizard - accessible from buckets and telegraf
const bucketDropdown = '[data-testid=bucket-dropdown]';
const pluginsFilter = '[data-testid=input-field][placeholder*=Plugins]';
const telegrafNameInput = '[data-testid=input-field][title$=\'Name\']';
const telegrafDescrInput = '[data-testid=input-field][title$=\'Description\']';
//common controls in basePage
const codeSnippetWithToken = 'div.code-snippet:first-of-type';
const codeSnippetWithTelegrafCommand = 'div.code-snippet:nth-of-type(2)';
class loadDataPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: tabsCss}], urlCtx);
}
async isTabLoaded(tabUrlPart, selectors = undefined){
if(selectors) {
await super.isLoaded(selectors.concat([{type: 'css', selector: tabsCss}]), tabUrlPart);
}else{
await super.isLoaded([{type: 'css', selector: tabsCss}], tabUrlPart);
}
}
async getTabByName(name){
return await this.driver.findElement(By.xpath(`${tabsXpath}//div[@data-testid='tabs--tab' and @id='${name.toLowerCase().replace(' ', '-')}']`));
}
async getPageTitle(){
return await this.driver.findElement(By.css(pageTitle));
}
//Create Scraper Popup
async getCreateScraperTitle(){
return await this.driver.findElement(By.css(createScraperTitle));
}
static getCreateScraperTitleSelector(){
return { type: 'css', selector: createScraperTitle};
}
async getCreateScraperDismiss(){
return await this.driver.findElement(By.css(createScraperDismiss));
}
async getCreateScraperNameInput(){
return await this.driver.findElement(By.css(createScraperNameInput));
}
static getCreateScraperNameInputSelector(){
return { type: 'css', selector: createScraperNameInput};
}
async getCreateScraperBucketDropdown(){
return await this.driver.findElement(By.css(createScraperBucketDropdown));
}
async getCreateScraperUrlInput(){
return await this.driver.findElement(By.css(createScraperUrlInput));
}
static getCreateScraperUrlInputSelector(){
return { type: 'css', selector: createScraperUrlInput};
}
async getCreateScraperCancel(){
return await this.driver.findElement(By.css(createScraperCancel));
}
async getCreateScraperSubmit(){
return await this.driver.findElement(By.css(createScraperSubmit));
}
async getCreateScraperBucketDropdownItem(item){
return await this.driver.findElement(By.xpath(`//*[@data-testid='dropdown-item']/div[text() = '${item}']`));
}
static getCreateScraperBucketDropdownItemSelector(item){
return `//*[@data-testid='dropdown-item']/div[text() = '${item}']`;
}
static getCreateScraperBucketDropdownItemsSelector(){
return {type: 'css', selector: createScraperBucketDropdownItems};
}
//Create telegraf wizard
async getBucketDropdown(){
return await this.driver.findElement(By.css(bucketDropdown));
}
async getPluginsFilter(){
return await this.driver.findElement(By.css(pluginsFilter));
}
async getPluginTileByName(name){
return await this.driver.findElement(By.css(`[data-testid=telegraf-plugins--${name}]`));
}
async getBucketDropdownItem(item){
return await this.driver.findElement(
By.xpath(`//*[@data-testid='dropdown-item'][div[text()='${item}']]`));
}
async getTelegrafNameInput(){
return await this.driver.findElement(By.css(telegrafNameInput));
}
async getTelegrafDescrInput(){
return await this.driver.findElement(By.css(telegrafDescrInput));
}
async getCodeSnippetWithToken(){
return await this.driver.findElement(By.css(codeSnippetWithToken));
}
async getCodeSnippetWithTelegrafCommand(){
return await this.driver.findElement(By.css(codeSnippetWithTelegrafCommand));
}
}
module.exports = loadDataPage;

View File

@ -1,93 +0,0 @@
const { By } = require('selenium-webdriver');
const loadDataPage = require(__srcdir + '/pages/loadData/loadDataPage.js');
const basePage = require(__srcdir + '/pages/basePage.js');
const scrapersFilter = '[data-testid=search-widget]';
const createScraperHeader = '[data-testid=create-scraper-button-header]';
const nameSort = '[data-testid=resource-list--sorter]:nth-of-type(1)';
const urlSort = '[data-testid=resource-list--sorter]:nth-of-type(2)';
const bucketSort = '[data-testid=resource-list--sorter]:nth-of-type(3)';
const createScraperEmpty = '[data-testid=create-scraper-button-empty]';
const scraperCards = '[data-testid=resource-card]';
const urlCtx = 'scrapers';
class scrapersTab extends loadDataPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: scrapersFilter},
{type: 'css', selector: createScraperHeader},
basePage.getSortTypeButtonSelector()
//{type: 'css', selector: nameSort},
//{type: 'css', selector: urlSort},
//{type: 'css', selector: bucketSort},
]
);
}
async getScraperCardByName(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='resource-card'][//span[text() = '${name}']]`));
}
async getScraperCardName(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='resource-editable-name']//span[text()='${name}']`));
}
async getScraperCardNameEditButton(name){
return await this.driver.findElement(By.xpath(`//*[./*[@data-testid='resource-editable-name'][.//span[text()='${name}']]]//*[@data-testid='editable-name']`));
}
async getScraperCardNameEditField(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='input-field'][@value='${name}']`));
}
async getScraperCardDeleteByName(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='resource-card'][.//span[text()='${name}']]//*[@data-testid='context-menu']`));
}
async getScraperCardDeleteConfirmByName(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='resource-card'][.//span[text()='${name}']]//*[@data-testid='confirmation-button']`));
}
async getScrapersFilter(){
return this.driver.findElement(By.css(scrapersFilter));
}
async getCreateScraperHeader(){
return this.driver.findElement(By.css(createScraperHeader));
}
async getNameSort(){
return this.driver.findElement(By.css(nameSort));
}
async getUrlSort(){
return this.driver.findElement(By.css(urlSort));
}
async getBucketSort(){
return this.driver.findElement(By.css(bucketSort));
}
async getCreateScraperEmpty(){
return this.driver.findElement(By.css(createScraperEmpty));
}
static getCreateScraperEmptySelector(){
return { type: 'css', selector: createScraperEmpty};
}
async getScraperCards(){
return await this.driver.findElements(By.css(scraperCards));
}
}
module.exports = scrapersTab;

View File

@ -1,317 +0,0 @@
const { By } = require('selenium-webdriver');
const loadDataPage = require(__srcdir + '/pages/loadData/loadDataPage.js');
const basePage = require(__srcdir + '/pages/basePage.js');
const telegrafsFilter = '[data-testid=search-widget]';
const createConfigInHeader = '//div[@data-testid=\'tabbed-page--header\']//*[contains(@title, \'Create\')]';
const nameSort = '[data-testid=name-sorter]';
const bucketSort = '[data-testid=bucket-sorter]';
const createConfigInBody = '[data-testid=resource-list] [data-testid=button]';
const telegrafCardTemplate = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]';
const telegrafCards = '[data-testid=resource-card]';
const telegrafCardSetupInstructions = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'setup-instructions-link\']';
const telegrafCardName = '//*[@data-testid=\'collector-card--name\'][span[text()=\'%NAME%\']]';
const telegrafCardNameEditBtn = '//*[./*[@data-testid=\'collector-card--name\'][span[text()=\'%NAME%\']]]//*[@data-testid=\'collector-card--name-button\']';
const telegrafCardNameInput = '[data-testid=\'collector-card--input\']'; //should only be one active
const telegrafCardDescr = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']';
const telegrafCardDescrEditBtn = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']//*[@data-testid=\'icon\']';
const telegrafCardDescrInput = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//div[@data-testid=\'resource-list--editable-description\']//input';
const telegrafCardDelete = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'telegraf-delete-menu\']';
const telegrafCardDeleteConfirm = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//button[@data-testid=\'telegraf-delete-button\']';
const telegrafCardAddLabelBtn = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'inline-labels--add\']';
const telegrafCardLabelPopup = '[data-testid=inline-labels--popover--dialog]';
const telegrafCardLabelPopupListItem = '[data-testid=\'inline-labels--popover--dialog\'] [data-testid=\'label-list--item %ITEM%\']';
const telegrafCardLabelPillItem = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'label--pill %ITEM%\']';
const telegrafCardLabelPopupFilter = '[data-testid=\'inline-labels--popover--dialog\'] [data-testid=\'inline-labels--popover-field\']';
const telegrafCardLabelEmptyState = '[data-testid=\'inline-labels--popover--dialog\'] [data-testid=\'empty-state--text\']';
const telegrafCardLabelPillDelete = '//*[@data-testid=\'resource-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'label--pill--delete %ITEM%\']';
const urlCtx = 'telegrafs';
// Telegraf wizard
const bucketDropdownBtn = '[data-testid=bucket-dropdown--button] ';
const pluginFilter = '[data-testid=input-field][placeholder*=\'Plugins\']';
const pluginTileTemplate = '[data-testid=telegraf-plugins--%TILE_NAME%]';
// Telegraf wizard step 2
const configurationNameInput = '[data-testid=input-field][title*=\'Configuration Name\']';
const configurationDescrInput = '[data-testid=input-field][title*=\'Configuration Descr\']';
const configurationPluginsSideBar = '//*[*[text()=\'Plugins\']]//div[contains(@class,\'side-bar--tabs\')]';
//Telegraf wizard edit plugin
const pluginDockerEditEndpoint = '//*[.//*[text()=\'endpoint\']][@data-testid=\'form--element\']//*[@data-testid=\'input-field\']';
const pluginK8SEditEndpoint = '//*[.//*[text()=\'url\']][@data-testid=\'form--element\']//*[@data-testid=\'input-field\']';
const pluginNGINXEditEndpoint = '//*[.//*[text()=\'urls\']][@data-testid=\'form--element\']//*[@data-testid=\'input-field\']';
const pluginNGINXAddUrlButton = '[data-testid=button][title=\'Add to list of urls\']';
const pluginNGINXDeleteFirstURL = '[data-testid=confirmation-button--button][title=\'Delete\']:nth-of-type(1)';
const pluginNGINXDeleteURLConfirmButton = '[data-testid=confirmation-button--confirm-button]';
const pluginNGINXURLListItems = '[data-testid=overlay--body] [data-testid=\'grid--column\'] [data-testid=index-list]';
const pluginRedisServersEditEndpoint = '//*[.//*[text()=\'servers\']][@data-testid=\'form--element\']//*[@data-testid=\'input-field\']';
const pluginRedisPasswordEditEndpoint = '//*[.//*[text()=\'password\']][@data-testid=\'form--element\']//*[@data-testid=\'input-field\']';
//Telegraf wizard step 3
const codeToken = '//pre[contains(text(), \'TOKEN\')]';
const codeCliTelegraf = '//code[contains(text(), \'telegraf\')]';
const copyToClipboardToken = '//*[@class=\'code-snippet\'][.//*[contains(text(),\'TOKEN\')]]//*[@data-testid=\'button-copy\']';
const copyToClipboardCommand = '//*[@class=\'code-snippet\'][.//*[contains(text(),\'telegraf\')]]//*[@data-testid=\'button-copy\']';
//Config Popup
const downloadConfigButton = '//*[@data-testid=\'button\'][span[text()=\'Download Config\']]';
class telegrafsTab extends loadDataPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: telegrafsFilter},
{type: 'xpath', selector: createConfigInHeader},
//{type: 'css', selector: nameSort},
basePage.getSortTypeButtonSelector()
//{type: 'css', selector: bucketSort},
]
);
}
async getTelegraphCardByName(name){
return await this.driver.findElement(By.xpath(`//*[@data-testid='resource-card'][//span[text()='${name}']]`));
}
async getTelegrafsFilter(){
return await this.driver.findElement(By.css(telegrafsFilter));
}
async getCreateConfigInHeader(){
return await this.driver.findElement(By.xpath(createConfigInHeader));
}
async getNameSort(){
return await this.driver.findElement(By.css(nameSort));
}
async getBucketSort(){
return await this.driver.findElement(By.css(bucketSort));
}
async getCreateConfigInBody(){
return await this.driver.findElement(By.css(createConfigInBody));
}
// Telegraf Wizard
async getBucketDropdownBtn(){
return await this.driver.findElement(By.css(bucketDropdownBtn));
}
async getPluginFilter(){
return await this.driver.findElement(By.css(pluginFilter));
}
async getPluginTileByName(name){
return await this.driver.findElement(By.css(pluginTileTemplate.replace('%TILE_NAME%', name)));
}
static getPluginTitleSelectorByName(name){
return { type: 'css', selector: pluginTileTemplate.replace('%TILE_NAME%', name)};
}
// Telegraf Wizard step 2
async getPluginItemByName(name){
return await this.driver.findElement(By.xpath(`//*[contains(@class, 'side-bar--tab')]/div[.//*[text() = '${name.toLowerCase()}']]`));
}
async getConfigurationNameInput(){
return await this.driver.findElement(By.css(configurationNameInput));
}
static getConfigurationNameInputSelector(){
return { type: 'css', selector: configurationNameInput};
}
async getConfigurationDescrInput(){
return await this.driver.findElement(By.css(configurationDescrInput));
}
static getConfigurationDescrInputSelector(){
return { type: 'css', selector: configurationDescrInput};
}
async getConfigurationPluginsSideBar(){
return await this.driver.findElement(By.xpath(configurationPluginsSideBar));
}
static configurationPluginsSideBarSelector(){
return { type: 'css', selector: configurationPluginsSideBar};
}
//Telegraf wizard edit plugin
async getPluginDockerEditEndpoint(){
return await this.driver.findElement(By.xpath(pluginDockerEditEndpoint));
}
async getPluginK8SEditEndpoint(){
return await this.driver.findElement(By.xpath(pluginK8SEditEndpoint));
}
async getPluginNGINXEditEndpoint(){
return await this.driver.findElement(By.xpath(pluginNGINXEditEndpoint));
}
async getPluginNGINXAddUrlButton(){
return await this.driver.findElement(By.css(pluginNGINXAddUrlButton));
}
async getPluginNGINXDeleteFirstURL(){
return await this.driver.findElement(By.css(pluginNGINXDeleteFirstURL));
}
async getPluginNGINXDeleteURLConfirmButton(){
return await this.driver.findElement(By.css(pluginNGINXDeleteURLConfirmButton));
}
async getPluginNGINXURLListItems(){
return await this.driver.findElements(By.css(pluginNGINXURLListItems));
}
static getPluginNGINXURLListItemsSelector(){
return { type: 'css', selector: pluginNGINXURLListItems };
}
async getPluginRedisServersEditEndpoint(){
return await this.driver.findElement(By.xpath(pluginRedisServersEditEndpoint));
}
async getPluginRedisPasswordEditEndpoint(){
return await this.driver.findElement(By.xpath(pluginRedisPasswordEditEndpoint));
}
async getCodeToken(){
return await this.driver.findElement(By.xpath(codeToken));
}
async getCodeCliTelegraf(){
return await this.driver.findElement(By.xpath(codeCliTelegraf));
}
// Config popup
async getDownloadConfigButton(){
return await this.driver.findElement(By.xpath(downloadConfigButton));
}
// Telegraf Card List
async getTelegrafCardByName(name){
return await this.driver.findElement(By.xpath(telegrafCardTemplate.replace('%NAME%', name)));
}
static getTelegrafCardSelectorByName(name){
return { type: 'xpath', selector: telegrafCardTemplate.replace('%NAME%', name) };
}
async getTelegrafCards(){
return await this.driver.findElements(By.css(telegrafCards));
}
async getCopyToClipboardToken(){
return await this.driver.findElement(By.xpath(copyToClipboardToken));
}
async getCopyToClipboardCommand(){
return await this.driver.findElement(By.xpath(copyToClipboardCommand));
}
async getTelegrafCardSetupInstructions(card){
return await this.driver.findElement(By.xpath(telegrafCardSetupInstructions.replace('%NAME%', card)));
}
async getTelegrafCardName(name){
return await this.driver.findElement(By.xpath(telegrafCardName.replace('%NAME%', name)));
}
async getTelegrafCardNameEditBtn(name){
return await this.driver.findElement(By.xpath(telegrafCardNameEditBtn.replace('%NAME%', name)));
}
async getTelegrafCardNameInput(name){
return await this.driver.findElement(By.css(telegrafCardNameInput.replace('%NAME%', name)));
}
async getTelegrafCardDescr(name){
return await this.driver.findElement(By.xpath(telegrafCardDescr.replace('%NAME%', name)));
}
async getTelegrafCardDescrEditBtn(name){
return await this.driver.findElement(By.xpath(telegrafCardDescrEditBtn.replace('%NAME%', name)));
}
async getTelegrafCardDescrInput(name){
return await this.driver.findElement(By.xpath(telegrafCardDescrInput.replace('%NAME%', name)));
}
async getTelegrafCardDelete(name){
return await this.driver.findElement(By.xpath(telegrafCardDelete.replace('%NAME%', name)));
}
async getTelegrafCardDeleteConfirm(name){
return await this.driver.findElement(By.xpath(telegrafCardDeleteConfirm.replace('%NAME%', name)));
}
async getTelegrafCardAddLabelBtn(name){
return await this.driver.findElement(By.xpath(telegrafCardAddLabelBtn.replace('%NAME%', name)));
}
async getTelegrafCardLabelPopup(name){
return await this.driver.findElement(By.css(telegrafCardLabelPopup.replace('%NAME%', name)));
}
static getTelegrafCardLabelPopupSelector(name){
return { type: 'css', selector: telegrafCardLabelPopup.replace('%NAME%', name)};
}
async getTelegrafCardLabelPopupListItem(name, item){
return await this.driver.findElement(By.css(telegrafCardLabelPopupListItem
.replace('%ITEM%', item)));
}
static getTelegrafCardLabelPopupListItemSelector(name, item){
return { type: 'css', selector: telegrafCardLabelPopupListItem
.replace('%ITEM%', item)};
}
async getTelegrafCardLabelPillItem(name, item){
return await this.driver.findElement(By.xpath(telegrafCardLabelPillItem
.replace('%NAME%', name)
.replace('%ITEM%', item)));
}
static getTelegrafCardLabelPillItemSelector(name, item){
return { type: 'xpath', selector: telegrafCardLabelPillItem
.replace('%NAME%', name)
.replace('%ITEM%', item)};
}
async getTelegrafCardLabelPopupFilter(name){
return await this.driver.findElement(By.css(telegrafCardLabelPopupFilter.replace('%NAME%', name)));
}
async getTelegrafCardLabelEmptyState(name){
return await this.driver.findElement(By.css(telegrafCardLabelEmptyState.replace('%NAME%', name)));
}
async getTelegrafCardLabelPillDelete(name, item){
return await this.driver.findElement(By.xpath(telegrafCardLabelPillDelete
.replace('%NAME%', name)
.replace('%ITEM%', item)));
}
}
module.exports = telegrafsTab;

View File

@ -1,196 +0,0 @@
const { By } = require('selenium-webdriver');
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const tokensFilter = '[data-testid=input-field--filter]';
const genTokenButton = '[data-testid=dropdown-button--gen-token]';
const tokenListing = '[data-testid=resource-list]';
//const descHeader = '[data-testid=index-list--header-cell]:nth-of-type(1)';// header no longer present 10.6
//const statusHeader = '[data-testid=index-list--header-cell]:nth-of-type(2)'; //header no longer present 10.6
//const createVariableBody = '[data-testid=button-create-initial]';
const tokenCellTemplate = '[data-testid="token-card %DESCR%"]';
const generateTokenDropdownBtn = '[data-testid=dropdown-button--gen-token]';
const generateTokenItem = '[data-testid=\'dropdown-item generate-token--%ITEM%\']';
const tokenCardDisableToggle = '[data-testid = \'token-card %DESCR%\'] [data-testid=\'slide-toggle\']';
const tokenSorterButton = '[data-testid=resource-sorter--button]';
const tokenSorterItem = '[data-testid=resource-sorter--%ITEM%]';
const tokensSortByDescription = '//*[@data-testid=\'index-list--header-cell\'][text()=\'Description\']';
const tokenDescription = '[data-testid=\'token-name %DESCR%\']';
const tokenDescriptionEditBtn = '[data-testid=\'token-card %DESCR%\'] [data-testid=\'resource-editable-name--button\']';
const tokenDescriptionEditInput = '//*[./*[@data-testid=\'resource-editable-name--input--default\']]/input';
const tokenCardDeleteButton = '[data-testid=\'token-card %DESCR%\'] [data-testid=\'context-menu\']';
// next selector is deprecated - todo clean up
const tokenCardDeleteConfirm = '[data-testid=\'token-card %DESCR%\'] [data-testid=\'delete-token\']';
const tokenCardPopoverDeletConfirm = '//*[@data-testid=\'delete-token--popover--dialog\']//*[text() = \'Confirm\']';
// Generate Read/Write token popup
const descrInput = '[data-testid=\'input-field--descr\']';
const typeRadioButton = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//*[@data-testid=\'select-group--option\'][@title=\'%SET%\']';
const searchBuckets = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//input[@data-testid=\'input-field\'][contains(@placeholder,\'Search buckets\')]';
const emptyStateText = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//*[@data-testid=\'empty-state--text\']';
const searchBucketsListItem = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//*[@data-testid=\'selector-list %NAME%\']';
const selectAllBuckets = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//*[@title=\'Select All\']';
const deselectAllBuckets = '//*[@data-testid=\'flex-box\'][div[text()=\'%MODE%\']]//*[@title=\'Deselect All\']';
//Generate All Access token popup
const allAccessDescrInput = '[data-testid=all-access-token-input]';
const allAccessCancelButton = '[data-testid=button][title=Cancel]';
const allAccessSaveButton = '[data-testid=button--save]';
//Review token popup
const tokenReviewTokenCode = 'div.code-snippet--text pre code';
const tokenReviewPermissions = '[data-testid=permissions-section]';
const tokenReviewPermissionItem = '//*[@data-testid=\'permissions-section\'][.//h3[text()=\'%ITEM%\']]';
const urlCtx = 'tokens';
class tokensTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: tokensFilter},
{type: 'css', selector: genTokenButton},
{type: 'css', selector: tokenListing},
{type: 'css', selector: tokenSorterButton}
]
);
}
async getTokenCellByDescr(descr){
return await this.driver.findElement(By.css(tokenCellTemplate.replace('%DESCR%', descr)));
}
static getTokenCellSelectorByDescr(descr){
return { type: 'css', selector: tokenCellTemplate.replace('%DESCR%', descr)};
}
async getGenerateTokenDropdownBtn(){
return await this.driver.findElement(By.css(generateTokenDropdownBtn));
}
async getGenerateTokenItem(item){
return await this.driver.findElement(By.css(generateTokenItem.replace('%ITEM%', item)));
}
async getDescrInput(){
return await this.driver.findElement(By.css(descrInput));
}
async getTypeRadioButton(mode, set){
return await this.driver.findElement(By.xpath(typeRadioButton
.replace('%MODE%',mode)
.replace('%SET%',set)));
}
async getSearchBuckets(mode){
return await this.driver.findElement(By.xpath(searchBuckets.replace('%MODE%', mode)));
}
static getSearchBucketsSelector(mode){
return { type: 'xpath', selector: searchBuckets.replace('%MODE%', mode) };
}
async getEmptyStateText(mode){
return await this.driver.findElement(By.xpath(emptyStateText.replace('%MODE%', mode)));
}
static getEmptyStateTextSelector(mode){
return { type: 'xpath', selector: emptyStateText.replace('%MODE%', mode) };
}
async getSearchBucketsListItem(mode, name){
return await this.driver.findElement(By.xpath(searchBucketsListItem
.replace('%MODE%', mode)
.replace('%NAME%', name)));
}
static getSearchBucketsListItemSelector(mode, name){
return { type: 'xpath', selector: searchBucketsListItem
.replace('%MODE%', mode)
.replace('%NAME%', name)};
}
async getSelectAllBuckets(mode){
return await this.driver.findElement(By.xpath(selectAllBuckets.replace('%MODE%', mode)));
}
async getDeselectAllBuckets(mode){
return await this.driver.findElement(By.xpath(deselectAllBuckets.replace('%MODE%', mode)));
}
async getAllAccessDescrInput(){
return await this.driver.findElement(By.css(allAccessDescrInput));
}
async getAllAccessCancelButton(){
return await this.driver.findElement(By.css(allAccessCancelButton));
}
async getAllAccessSaveButton(){
return await this.driver.findElement(By.css(allAccessSaveButton));
}
async getTokenCardDisableToggle(descr){
return await this.driver.findElement(By.css(tokenCardDisableToggle.replace('%DESCR%', descr)));
}
async getTokenCardDescriptions(){
return await this.driver.findElements(By.css('[data-testid^="token-name"]'));
}
async getTokenSorterButton(){
return await this.driver.findElement(By.css(tokenSorterButton));
}
async getTokenSorterItem(item){
return await this.driver.findElement(By.css(tokenSorterItem.replace('%ITEM%',
item.toLowerCase().replace(' ','-'))));
}
async getTokensSortByDescription(){
return await this.driver.findElement(By.xpath(tokensSortByDescription));
}
async getTokenDescription(descr){
return await this.driver.findElement(By.css(tokenDescription.replace('%DESCR%', descr)));
}
async getTokenDescriptionEditBtn(descr){
return await this.driver.findElement(By.css(tokenDescriptionEditBtn.replace('%DESCR%', descr)));
}
async getTokenDescriptionEditInput(descr){
return await this.driver.findElement(By.xpath(tokenDescriptionEditInput));
}
async getTokenReviewTokenCode(){
return await this.driver.findElement(By.css(tokenReviewTokenCode));
}
async getTokenReviewPermissions(){
return await this.driver.findElement(By.css(tokenReviewPermissions));
}
async getTokenReviewPermissionItem(item){
return await this.driver.findElement(By.xpath(tokenReviewPermissionItem.replace('%ITEM%', item)));
}
async getTokenCardDeleteButton(descr){
return await this.driver.findElement(By.css(tokenCardDeleteButton.replace('%DESCR%', descr)));
}
async getTokenCardDeleteConfirm(descr){
return await this.driver.findElement(By.css(tokenCardDeleteConfirm.replace('%DESCR%', descr)));
}
async getTokenCardPopoverDeletConfirm(){
return await this.driver.findElement(By.xpath(tokenCardPopoverDeletConfirm));
}
}
module.exports = tokensTab;

View File

@ -1,266 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const pageTitle = '[data-testid=\'page-title\']';
const createCheckButton = '[data-testid=create-check]';
const createEndpointButton = '[data-testid=create-endpoint]';
const createRuleButton = '[data-testid=create-rule]';
const checksFilterInput = '[data-testid=\'filter--input checks\']';
const checksQuestionMark = '[data-testid=\'Checks--question-mark\']';
const checksTooltipContents = '[data-testid=\'Checks--question-mark--tooltip--contents\']';
const alertingTab = '[data-testid=alerting-tab--%TABNAME%]';
const createCheckDropdown = '[data-testid=\'checks--column\'] [data-testid=\'dropdown-menu--contents\']';
const createCheckDropdownItem = '[data-testid=\'dropdown-menu--contents\'] [data-testid=create-%ITEM%-check]';
const endpointsFilterInput = '[data-testid=\'filter--input endpoints\']';
const endpointsQuestionMark = '[data-testid=\'Notification Endpoints--question-mark\']';
const endpointsTooltipContents = '[data-testid=\'Notification Endpoints--question-mark--tooltip--contents\']';
const rulesFilterInput = '[data-testid=\'filter--input rules\']';
const rulesQuestionMark = '[data-testid=\'Notification Rules--question-mark\']';
const rulesTooltipContents = '[data-testid=\'Notification Rules--question-mark--tooltip--contents\']';
const firstTimeThresholdCheckCreateButton = '[data-testid=\'checks--column\'] [data-testid=panel--body] [data-testid=button][title=\'Threshold Check\']';
const firstTimeDeadmanCheckCreateButton = '[data-testid=\'checks--column\'] [data-testid=panel--body] [data-testid=button][title=\'Deadman Check\']';
const emptyStateColumnText = '[data-testid=\'%COL%--column\'] [data-testid=\'empty-state--text\']';
//Resource card
const checkCardName = '//*[@data-testid=\'check-card--name\'][./*[text()=\'%NAME%\']]';
const checkCardNameEditButton = '//*[./*/*[text()=\'%NAME%\']]//*[@data-testid=\'check-card--name-button\']';
const checkCardNameInput = '[data-testid=check-card--input]';
const checkCardDescription = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']';
const checkCardDescriptionEditButton = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'resource-list--editable-description\']//*[@data-testid=\'icon\']';
const checkCardDescriptionInput = '[data-testid=check-card] [data-testid=input-field]';
const checkCardAddLabelButton = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'inline-labels--add\']';
const checkCardLabelEmpty = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'inline-labels--empty\']';
const checkCardLabelPill = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'label--pill %LABEL%\']';
const checkCardLabelRemove = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'label--pill--delete %LABEL%\']';
const checkCardCloneButton = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-menu\'][./*[contains(@class,\'duplicate\')]]';
const checkCardCloneConfirm = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-menu-item\'][text()=\'Clone\']';
const checkCardOpenHistory = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-history-menu\'][./*[contains(@class,\'eye-open\')]]';
const checkCardOpenHistoryConfirm = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-history-task\']';
const checkCardDeleteButton = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-delete-menu\']';
const checkCardDeleteConfirm = '//*[@data-testid=\'check-card\'][.//*[text()=\'%NAME%\']]//*[@data-testid=\'context-delete-task\']'
//Create Endpoint Popup
const epPopupEndpointDropdownButton = '[data-testid=endpoint--dropdown--button]';
const epPopupEndpointNameInput = '[data-testid=endpoint-name--input]';
const epPopupEndpointDescriptionText = '[data-testid=endpoint-description--textarea]';
const epPopupCancelButton = '[data-testid=endpoint-cancel--button]';
const epPopupSaveButton = '[data-testid=endpoint-save--button]';
//Query Builder
const qbSelectorListItem = '[data-testid=\'selector-list %ITEM%\']';
const urlCtx = 'alerting';
class alertsPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: pageTitle},
{type: 'css', selector: createCheckButton},
{type: 'css', selector: createEndpointButton},
{type: 'css', selector: createRuleButton},
{type: 'css', selector: checksFilterInput},
{type: 'css', selector: endpointsFilterInput},
{type: 'css', selector: rulesFilterInput},
], urlCtx);
}
async getPageTitle(){
return await this.driver.findElement(By.css(pageTitle));
}
async getAlertingTab(tabName){
return await this.driver.findElement(By.css(alertingTab.replace('%TABNAME%', tabName)));
}
async getCreateCheckButton(){
return await this.driver.findElement(By.css(createCheckButton));
}
async getCreateEndpointButton(){
return await this.driver.findElement(By.css(createEndpointButton));
}
async getCreateRuleButton(){
return await this.driver.findElement(By.css(createRuleButton));
}
async getChecksQuestionMark(){
return await this.driver.findElement(By.css(checksQuestionMark));
}
async getChecksFilterInput(){
return await this.driver.findElement(By.css(checksFilterInput));
}
async getChecksTooltipContents(){
return await this.driver.findElement(By.css(checksTooltipContents));
}
static getChecksTooltipContentsSelector(){
return { type: 'css', selector: checksTooltipContents };
}
async getEndpointsQuestionMark(){
return await this.driver.findElement(By.css(endpointsQuestionMark));
}
async getEndpointsFilterInput(){
return await this.driver.findElement(By.css(endpointsFilterInput));
}
async getEndpointsTooltipContents(){
return await this.driver.findElement(By.css(endpointsTooltipContents));
}
static getEndpointsTooltipContentsSelector(){
return { type: 'css', selector: endpointsTooltipContents };
}
async getRulesFilterInput(){
return await this.driver.findElement(By.css(rulesFilterInput));
}
async getRulesQuestionMark(){
return await this.driver.findElement(By.css(rulesQuestionMark));
}
async getRulesTooltipContents(){
return await this.driver.findElement(By.css(rulesTooltipContents));
}
static getRulesTooltipContentsSelector(){
return { type: 'css', selector: rulesTooltipContents };
}
async getFirstTimeThresholdCheckCreateButton(){
return await this.driver.findElement(By.css(firstTimeThresholdCheckCreateButton));
}
async getFirstTimeDeadmanCheckCreateButton(){
return await this.driver.findElement(By.css(firstTimeDeadmanCheckCreateButton));
}
async getCreateCheckDropdownItem(item){
return await this.driver.findElement(By.css(createCheckDropdownItem.replace('%ITEM%', item.toLowerCase())));
}
static getCreateCheckDropdownSelector(){
return { type: 'css', selector: createCheckDropdown }
}
async getEpPopupEndpointDropdownButton(){
return await this.driver.findElement(By.css(epPopupEndpointDropdownButton));
}
async getEpPopupEndpointNameInput(){
return await this.driver.findElement(By.css(epPopupEndpointNameInput));
}
async getEpPopupEndpointDescriptionText(){
return await this.driver.findElement(By.css(epPopupEndpointDescriptionText));
}
async getEpPopupCancelButton(){
return await this.driver.findElement(By.css(epPopupCancelButton));
}
async getEpPopupSaveButton(){
return await this.driver.findElement(By.css(epPopupSaveButton));
}
async getQbSelectorListItem(item){
return await this.driver.findElement(By.css(qbSelectorListItem.replace('%ITEM%', item)))
}
async getCheckCardName(name){
return await this.driver.findElement(By.xpath(checkCardName.replace('%NAME%', name)));
}
static getCheckCardNameSelector(name){
return {type: 'xpath', selector: checkCardName.replace('%NAME%', name)}
}
async getCheckCardNameEditButton(name){
return await this.driver.findElement(By.xpath(checkCardNameEditButton.replace('%NAME%', name)));
}
async getCheckCardNameInput(){
return await this.driver.findElement(By.css(checkCardNameInput));
}
async getCheckCardDescription(name){
return await this.driver.findElement(By.xpath(checkCardDescription.replace('%NAME%', name)));
}
async getCheckCardDescriptionEditButton(name){
return await this.driver.findElement(By.xpath(checkCardDescriptionEditButton.replace('%NAME%', name)));
}
async getCheckCardDescriptionInput(){
return await this.driver.findElement(By.css(checkCardDescriptionInput));
}
async getCheckCardAddLabelButton(name){
return await this.driver.findElement(By.xpath(checkCardAddLabelButton.replace('%NAME%', name)));
}
async getCheckCardLabelEmpty(name){
return await this.driver.findElement(By.xpath(checkCardLabelEmpty.replace('%NAME%', name)));
}
async getCheckCardLabelPill(name, label){
return await this.driver.findElement(By.xpath(checkCardLabelPill
.replace('%NAME%', name)
.replace('%LABEL%', label)));
}
static getCheckCardLabelPillSelector(name, label){
return { type: 'xpath', selector: checkCardLabelPill
.replace('%NAME%', name)
.replace('%LABEL%', label)}
}
async getCheckCardLabelRemove(name, label){
return await this.driver.findElement(By.xpath(checkCardLabelRemove
.replace('%NAME%', name)
.replace('%LABEL%', label)));
}
async getCheckCardCloneButton(name){
return await this.driver.findElement(By.xpath(checkCardCloneButton.replace('%NAME%', name)))
}
async getCheckCardCloneConfirm(name){
return await this.driver.findElement(By.xpath(checkCardCloneConfirm.replace('%NAME%', name)))
}
async getEmptyStateColumnText(col){
return await this.driver.findElement(By.css(emptyStateColumnText.replace('%COL%', col)));
}
async getCheckCardOpenHistory(name){
return await this.driver.findElement(By.xpath(checkCardOpenHistory.replace('%NAME%', name)))
}
async getCheckCardOpenHistoryConfirm(name){
return await this.driver.findElement(By.xpath(checkCardOpenHistoryConfirm.replace('%NAME%', name)));
}
async getCheckCardDeleteButton(name){
return await this.driver.findElement(By.xpath(checkCardDeleteButton.replace('%NAME%', name)));
}
async getCheckCardDeleteConfirm(name){
return await this.driver.findElement(By.xpath(checkCardDeleteConfirm.replace('%NAME%', name)));
}
}
module.exports = alertsPage;

View File

@ -1,198 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const thresholds = ["CRIT", "WARN", "INFO", "OK"];
const overlay = '[data-testid=overlay]';
const dismissButton = '[data-testid=page-control-bar] [data-testid=square-button]';
const saveCellButton = '[data-testid=overlay] [data-testid=save-cell--button]';
const pageCheckEditTitle = '[data-testid=overlay] [data-testid=page-header] [data-testid=page-title]';
const pageCheckEditTitleInput = '[data-testid=\'renamable-page-title--input\' ]';
const queriesToggle = '[data-testid=overlay] [data-testid=select-group--option][title=queries]';
const configureCheckToggle = '[data-testid=overlay] [data-testid=\'checkeo--header alerting-tab\']';
const defineQueryToggle = '[data-testid=select-group--option]';
const checklistPopover = '[data-testid=popover--contents] [class=query-checklist--popover]';
const checklistPopoverItemByText = '//*[@data-testid=\'popover--contents\']//*[text()=\'%TEXT%\']';
//Preview area
const previewThresholdHandleByLevel = '[class*=\'threshold-marker--handle threshold-marker--%LEVEL%\']';
// TODO timemachine controls -- see dashboards - try and reuse
// Configure Check Controls
// Properties
const confChkIntervalInput = '[data-testid=schedule-check]';
const confChkOffset = '[data-testid=offset-options]';
const confChkAddTagButton = '//*[./*/*[text() = \'Tags\']]//*[@data-testid=\'dashed-button\']';
// Status Message Template
const confChkMessageTextArea = '[data-testid=status-message-textarea]';
const confTagRuleKeyInputOfTag = '[data-testid=tag-rule]:nth-of-type(%INDEX%) [data-testid=\'tag-rule-key--input\'][name=key]';
const confTagRuleValueInputOfTag = '[data-testid=tag-rule]:nth-of-type(%INDEX%) [data-testid=\'tag-rule-key--input\'][name=value]';
const confTagRuleDimissOfTag = '[data-testid=tag-rule]:nth-of-type(%INDEX%) [data-testid=dismiss-button]';
// Thresholds
const confChkAddThresholdButton = '[data-testid=add-threshold-condition-%STATUS%]';
const confNthThresholdDefDropdownButton = '[data-testid=overlay] [data-testid=panel]:nth-of-type(%INDEX%) [data-testid=select-option-dropdown]';
const confNthThresholdDefDropdownItem = '[data-testid=overlay] [data-testid=panel]:nth-of-type(%INDEX%) [data-testid=select-option-dropdown] [data-testid=dropdown-item][title=\'%ITEM%\']';
const confNthThresholdDefInput = '[data-testid=overlay] [data-testid=panel]:nth-of-type(%INDEX%) [data-testid=input-field]';
const confNthThreshold2ndInput = '[data-testid=overlay] [data-testid=panel]:nth-of-type(%INDEX%) [data-testid^=\'component-spacer--flex-child\']:nth-of-type(3) [data-testid=input-field]';
//Deadman
const confDeadmanForInput = '//*[@data-testid=\'component-spacer\']/*[@data-testid=\'component-spacer\'][.//*[text()=\'for\']]//*[@data-testid=\'duration-input\']';
const confDeadmanForInputDropdownItem = '//*[@data-testid=\'component-spacer\']/*[@data-testid=\'component-spacer\'][.//*[text()=\'for\']]//*[@data-testid=\'dropdown-item\'][.//*[text()=\'%ITEM%\']]';
const confDeadmanStopInput = '//*[@data-testid=\'component-spacer\']/*[@data-testid=\'component-spacer\'][.//*[text()=\'And stop checking after\']]//*[@data-testid=\'duration-input\']';
const confDeadmanStopInputDropdownItem = '//*[@data-testid=\'component-spacer\']/*[@data-testid=\'component-spacer\'][.//*[text()=\'And stop checking after\']]//*[@data-testid=\'dropdown-item\'][.//*[text()=\'%ITEM%\']]';
const confDeadmanCheckLevelsDropdown = '//*[@data-testid=\'component-spacer\']/*[@data-testid=\'component-spacer\']//*[@data-testid=\'check-levels--dropdown--button\']';
const confDeadmanCheckLevelsDropodownItem = '[data-testid=\'check-levels--dropdown-item %LEVEL%\']';
const confDeadmanCheckLevelsDropdownSelected = '[data-testid^=check-levels--dropdown--button] [class*=\'selected\'] [class*=\'dropdown--name\']';
const urlCtx = 'checks';
class checkEditPage extends influxPage {
constructor(driver) {
super(driver);
}
async isLoaded(){
await super.isLoaded([
{type: 'css', selector: dismissButton},
{type: 'css', selector: pageCheckEditTitle},
{type: 'css', selector: queriesToggle},
{type: 'css', selector: configureCheckToggle}
], urlCtx);
}
static getOverlaySelector(){
return { type: 'css', selector: overlay};
}
async getSaveCellButton(){
return await this.driver.findElement(By.css(saveCellButton));
}
async getDismissButton(){
return await this.driver.findElement(By.css(dismissButton));
}
async getPageCheckEditTitle(){
return await this.driver.findElement(By.css(pageCheckEditTitle));
}
async getQueriesToggle(){
return await this.driver.findElement(By.css(queriesToggle));
}
async getConfigureCheckToggle(){
return await this.driver.findElement(By.css(configureCheckToggle))
}
async getDefineQueryToggle(){
return await this.driver.findElement(By.css(defineQueryToggle));
}
async getChecklistPopover(){
return await this.driver.findElement(By.css(checklistPopover));
}
async getPageCheckEditTitleInput(){
return await this.driver.findElement(By.css(pageCheckEditTitleInput));
}
async getConfChkIntervalInput(){
return await this.driver.findElement(By.css(confChkIntervalInput));
}
async getConfChkOffset(){
return await this.driver.findElement(By.css(confChkOffset));
}
async getConfChkAddTagButton(){
return await this.driver.findElement(By.xpath(confChkAddTagButton));
}
async getConfChkMessageTextArea(){
return await this.driver.findElement(By.css(confChkMessageTextArea));
}
async getConfChkAddThresholdButton(status){
return await this.driver.findElement(By.css(confChkAddThresholdButton.replace('%STATUS%', status)));
}
async getConfNthThresholdDefDropdownButton(index){
return await this.driver.findElement(By.css(confNthThresholdDefDropdownButton
.replace('%INDEX%', await this.getThresholdIndex(index))));
}
async getConfNthThresholdDefDropdownItem(index, item){
return await this.driver.findElement(By.css(confNthThresholdDefDropdownItem
.replace('%INDEX%',await this.getThresholdIndex(index)).replace('%ITEM%', item.toLowerCase())));
}
async getConfNthThresholdDefInput(index){
return await this.driver.findElement(By.css(confNthThresholdDefInput.replace('%INDEX%', await this.getThresholdIndex(index))));
}
async getConfNthThreshold2ndInput(index){
return await this.driver.findElement(By.css(confNthThreshold2ndInput.replace('%INDEX%', await this.getThresholdIndex(index))));
}
async getThresholdIndex(val){
return await thresholds.indexOf(val.toUpperCase().trim()) + 1;
}
async getChecklistPopoverItemByText(text){
return await this.driver.findElement(By.xpath(checklistPopoverItemByText.replace('%TEXT%', text.trim())));
}
async getConfDeadmanForInput(){
return await this.driver.findElement(By.xpath(confDeadmanForInput));
}
async getConfDeadmanForInputDropdownItem(item){
return await this.driver.findElement(By.xpath(confDeadmanForInputDropdownItem.replace('%ITEM%', item)));
}
async getConfDeadmanStopInput(){
return await this.driver.findElement(By.xpath(confDeadmanStopInput));
}
async getConfDeadmanStopInputDropdownItem(item){
return await this.driver.findElement(By.xpath(confDeadmanStopInputDropdownItem.replace('%ITEM%', item)));
}
async getConfDeadmanCheckLevelsDropdown(){
return await this.driver.findElement(By.xpath(confDeadmanCheckLevelsDropdown));
}
async getConfDeadmanCheckLevelsDropodownItem(level){
return await this.driver.findElement(By.css(confDeadmanCheckLevelsDropodownItem.replace('%LEVEL%', level)));
}
async getConfDeadmanCheckLevelsDropdownSelected(){
return await this.driver.findElement(By.css(confDeadmanCheckLevelsDropdownSelected));
}
async getPreviewThresholdHandleByLevel(level){
return await this.driver.findElement(By.css(previewThresholdHandleByLevel.replace('%LEVEL%', level.toLowerCase())));
}
async getConfTagRuleKeyInputOfTag(index){
return await this.driver.findElement(By.css(confTagRuleKeyInputOfTag.replace('%INDEX%', parseInt(index) + 2)));
}
async getConfTagRuleValueInputOfTag(index){
return await this.driver.findElement(By.css(confTagRuleValueInputOfTag.replace('%INDEX%', parseInt(index) + 2)));
}
async getConfTagRuleDimissOfTag(index){
return await this.driver.findElement(By.css(confTagRuleDimissOfTag.replace('%INDEX%', parseInt(index) + 2)));
}
}
module.exports = checkEditPage;

View File

@ -1,124 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const alertHistoryTitle = '[data-testid=alert-history-title]';
const filterInput = '//*[./*[@data-testid=\'check-status-input--default\']]//*[@data-testid=\'check-status-input\']';
const eventRows = '.event-row';
const eventRowCheckNameField = '//*[./*[@class=\'event-row\']][%INDEX%]//a';
const eventRowsAtLevel = '//*[./*[@class=\'event-row\']]//*[contains(@class,\'level-table-field--%LEVEL%\')]';
const eventMarkersDiv = '[data-testid=event-markers]';
const eventFilterExamplesDropdown = '[data-testid=check-status-dropdown--contents]';
const eventMarkerByIndex = '[data-testid=event-markers] > div:nth-of-type(%INDEX%)';
const eventMarkers = '[data-testid=event-markers] > *';
const eventMarkersByType = '[data-testid=event-markers] > [class*=\'event-marker--line__%TYPE%\'';
const eventMarkerToggleByType = '[data-testid=event-marker-vis-toggle-%TYPE%] > *';
const canvasGraphAxes = 'canvas.giraffe-axes';
const canvasGraphContent = 'canvas.giraffe-layer-line';
const graphToolTip = '[data-testid=giraffe-tooltip]';
const graphToolTipColumnValue = '//*[@data-testid=\'giraffe-tooltip-table\']/*[.//*[text()=\'%COLUMN%\']]/*[2]';
const eventMarkerTooltip = '[data-testid=app-wrapper]';
const eventMarkerColumnValue = '//*[@data-testid=\'app-wrapper\']//*[./*[text()=\'%COLUMN%\']]/*[2]';
const eventTable = '.event-table';
const urlCtx = 'checks';
class checkStatusHistoryPage extends influxPage {
constructor(driver) {
super(driver);
}
async isLoaded() {
await super.isLoaded([{type: 'css', selector: alertHistoryTitle },
{type: 'xpath', selector: filterInput },
{type: 'css', selector: canvasGraphAxes },
{type: 'css', selector: canvasGraphContent },
{type: 'css', selector: eventTable}
], urlCtx);
}
async getAlertHistoryTitle(){
return await this.driver.findElement(By.css(alertHistoryTitle));
}
async getFilterInput(){
return await this.driver.findElement(By.xpath(filterInput));
}
async getEventRows(){
return await this.driver.findElements(By.css(eventRows));
}
async getEventRowCheckNameField(index){
return await this.driver.findElement(By.xpath(eventRowCheckNameField.replace('%INDEX%', index)));
}
async getCanvasGraphAxes(){
return await this.driver.findElement(By.css(canvasGraphAxes));
}
async getCanvasGraphContent(){
return await this.driver.findElement(By.css(canvasGraphContent));
}
async getEventTable(){
return await this.driver.findElement(By.css(eventTable));
}
async getEventRowsAtLevel(level){
return await this.driver.findElements(By.xpath(eventRowsAtLevel.replace('%LEVEL%', level)))
}
async getEventMarkersDiv(){
return await this.driver.findElement(By.css(eventMarkersDiv));
}
async getEventFilterExamplesDropdown(){
return await this.driver.findElement(By.css(eventFilterExamplesDropdown));
}
static getEventFilterExamplesDropdownSelector(){
return { type: 'css', selector: eventFilterExamplesDropdown};
}
async getEventMarkerByIndex(index){
return await this.driver.findElement(By.css(eventMarkerByIndex.replace('%INDEX%', index)));
}
async getEventMarkers(){
return await this.driver.findElements(By.css(eventMarkers));
}
async getEventMarkersByType(){
return await this.driver.findElement(By.css(eventMarkersByType.replace('%TYPE%', type.toLowerCase())));
}
async getEventMarkerToggleByType(type){
return await this.driver.findElement(By.css(eventMarkerToggleByType.replace('%TYPE%', type.toLowerCase())));
}
async getEventMarkerTooltip(){
return await this.driver.findElement(By.css(eventMarkerTooltip));
}
async getGraphToolTip(){
return await this.driver.findElement(By.css(graphToolTip));
}
async graphToolTipColumnValue(column){
return await this.driver.findElement(By.xpath(graphToolTipColumnValue.replace('%COLUMN%', column)));
}
async eventMarkerColumnValue(column){
return await this.driver.findElement(By.xpath(eventMarkerColumnValue.replace('%COLUMN%', column)));
}
}
module.exports = checkStatusHistoryPage;

View File

@ -1,58 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By, until} = require('selenium-webdriver');
const headerMain = '[data-testid=admin-step--head-main]';
const navCrumbToken = 'data-testid=nav-step--';
const inputFieldToken = 'data-testid=input-field--';
const nextButton = '[data-testid=next]';
const formErrorMessage = '[data-testid=form--element-error]';
class initialSetupPage extends basePage {
constructor(driver){
super(driver);
}
async getHeaderMain(){
return await this.driver.findElement(By.css(headerMain));
}
async getCrumbStep(step){
return await this.driver.findElement(By.css(`[${navCrumbToken}${step}]`));
}
async getInputField(name){
return await this.driver.findElement(By.css(`[${inputFieldToken}${name}]`));
}
async getNextButton(){
return this.driver.wait(until.elementLocated(By.css(nextButton)));
//return await this.driver.findElement(By.css(nextButton))
}
async getFormErrorMessage(){
return this.driver.wait(until.elementLocated(By.css(formErrorMessage)));
}
async isFormErrorDisplayed(){
try {
await this.driver.findElement(By.css(formErrorMessage)).isDisplayed();
return true;
}catch(err){
if(err.name === 'NoSuchElementError'){
return false;
}else{
throw err;
}
}
}
async isNextButtonEnabled(){
return await this.driver.findElement(By.css(nextButton)).isEnabled();
}
}
module.exports = initialSetupPage;

View File

@ -1,39 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By, until} = require('selenium-webdriver');
const subtitle = 'h5.wizard-step--sub-title:first-of-type';
const qStartButton = '[data-testid=button--quick-start]';
const advancedButton = '[data-testid=button--advanced]';
const laterButton = '[data-testid=button--conf-later]';
const urlCtx = '/onboarding/2';
class readyPage extends basePage {
constructor(driver){
super(driver);
}
async getSubtitle(){
return this.driver.wait(until.elementLocated(By.css(subtitle)));
//return await this.driver.findElement(By.css(subtitle))
}
async getQuickStartButton(){
return await this.driver.findElement(By.css(qStartButton));
}
async getAdvancedButton(){
return await this.driver.findElement(By.css(advancedButton));
}
async isLoaded(){
await super.isLoaded([{type:'css', selector:subtitle},
{type:'css', selector:qStartButton},
{type:'css', selector:advancedButton},
{type:'css', selector:laterButton}], urlCtx);
}
}
module.exports = readyPage;

View File

@ -1,30 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By } = require('selenium-webdriver');
const headMain = '[data-testid=init-step--head-main]';
const creditsLink = '[data-testid=credits] a';
const startButton = '[data-testid=onboarding-get-started]';
class splashPage extends basePage {
constructor(driver){
super(driver);
}
async getHeadMain(){
//promises 201 - passing promises between methods
//N.B. returns a promise wrapping the element
return await this.driver.findElement(By.css(headMain));
}
async getCreditsLink(){
return await this.driver.findElement(By.css(creditsLink));
}
async getStartButton(){
return await this.driver.findElement(By.css(startButton));
}
}
module.exports = splashPage;

View File

@ -1,35 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const tabsCss = '[data-testid=tabs]';
const tabsXpath = '//*[@data-testid=\'tabs\']';
const urlCtx = 'members';
class organizationPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: tabsCss}], urlCtx);
}
async isTabLoaded(tabUrlPart, selectors = undefined){
if(selectors) {
await super.isLoaded(selectors.concat([{type: 'css', selector: tabsCss}]), tabUrlPart);
}else{
await super.isLoaded([{type: 'css', selector: tabsCss}], tabUrlPart);
}
}
async getTabByName(name){
return await this.driver.findElement(By.xpath(`${tabsXpath}//a[@data-testid='tabs--tab'][.//*[text()='${name}']]`));
}
//`//div[@class='site-bottom-wrapper'][descendant::a[contains(.,'${ siteName }')]]//div[contains(@class, 'manage-settings')]`
}
module.exports = organizationPage;

View File

@ -1,140 +0,0 @@
const { By } = require('selenium-webdriver');
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const basePage = require(__srcdir + '/pages/basePage.js');
const labelsFilter = '[data-testid=search-widget]';
const createLabelHeader = '[data-testid=button-create]';
const labelNameSort = '[data-testid=sorter--name]';
const labelDescSort = '[data-testid=sorter--desc]';
const createLabelEmpty = '[data-testid=button-create-initial]';
const labelCard = '//*[@data-testid=\'label-card\'][.//span[text()=\'%NAME%\']]';
const labelCardPills = '[data-testid^=label--pill]';
const labelCardPill = '//*[@data-testid=\'label-card\']//div[./span[@data-testid=\'label--pill %NAME%\']]';
const labelCardDescr = '//*[@data-testid=\'label-card\'][.//span[text()=\'%NAME%\']]//*[@data-testid=\'label-card--description\']';
const labelCardDelete = '//*[@data-testid=\'label-card\'][.//span[text()=\'%NAME%\']]//button[@data-testid=\'context-delete-menu\']';
const labelCardDeleteConfirm = '//*[@data-testid=\'label-card\'][.//span[text()=\'%NAME%\']]//button[@data-testid=\'context-delete-label\']';
const urlCtx = 'labels';
//Create Label Popup
const labelPopupNameInput = '[data-testid=create-label-form--name]';
const labelPopupDescrInput = '[data-testid=create-label-form--description]';
const labelPopupColorPicker = '[data-testid=color-picker]';
const labelPopupColorInput = '[data-testid=color-picker--input]';
const labelPopupCreateBtn = '[data-testid=create-label-form--submit]';
const labelPopupCancelBtn = '[data-testid=create-label-form--cancel]';
const labelPopupPreview = '[data-testid=overlay--body] [data-testid=form--box] div';
const labelPopupPreviewPill = '[data-testid=overlay--body] [data-testid^=label--pill]';
const labelPopupRandomColor = '[data-testid=color-picker--randomize]';
const labelPopupColorSwatch = '[data-testid=color-picker--swatch][title=\'%NAME%\']';
class labelsTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: labelsFilter},
{type: 'css', selector: createLabelHeader},
basePage.getSortTypeButtonSelector()
//{type: 'css', selector: labelNameSort},
//{type: 'css', selector: labelDescSort},
]
);
}
async getLabelNameSort(){
return await this.driver.findElement(By.css(labelNameSort));
}
async getLabelDescSort(){
return await this.driver.findElement(By.css(labelDescSort));
}
async getLabelsFilter(){
return await this.driver.findElement(By.css(labelsFilter));
}
async getCreateLabelHeader(){
return await this.driver.findElement(By.css(createLabelHeader));
}
async getCreateLabelEmpty(){
return await this.driver.findElement(By.css(createLabelEmpty));
}
async getLabelPopupNameInput(){
return await this.driver.findElement(By.css(labelPopupNameInput));
}
async getLabelPopupDescrInput(){
return await this.driver.findElement(By.css(labelPopupDescrInput));
}
async getLabelPopupColorPicker(){
return await this.driver.findElement(By.css(labelPopupColorPicker));
}
async getLabelPopupColorInput(){
return await this.driver.findElement(By.css(labelPopupColorInput));
}
async getLabelPopupCreateBtn(){
return await this.driver.findElement(By.css(labelPopupCreateBtn));
}
async getLabelPopupCancelBtn(){
return await this.driver.findElement(By.css(labelPopupCancelBtn));
}
async getLabelPopupPreview(){
return await this.driver.findElement(By.css(labelPopupPreview));
}
async getLabelPopupPreviewPill(){
return await this.driver.findElement(By.css(labelPopupPreviewPill));
}
async getLabelPopupRandomColor(){
return await this.driver.findElement(By.css(labelPopupRandomColor));
}
async getLabelPopupColorSwatch(name){
return await this.driver.findElement(By.css(labelPopupColorSwatch.replace('%NAME%', name)));
}
async getLabelCard(name){
return await this.driver.findElement(By.xpath(labelCard.replace('%NAME%', name)));
}
static getLabelCardSelector(name){
return { type: 'xpath', selector: labelCard.replace('%NAME%', name)};
}
async getLabelCardPill(name){
return await this.driver.findElement(By.xpath(labelCardPill.replace('%NAME%', name)));
}
async getLabelCardPills(){
return await this.driver.findElements(By.css(labelCardPills));
}
async getLabelCardDescr(name){
return await this.driver.findElement(By.xpath(labelCardDescr.replace('%NAME%', name)));
}
async getLabelCardDelete(name){
return await this.driver.findElement(By.xpath(labelCardDelete.replace('%NAME%', name)));
}
async getLabelCardDeleteConfirm(name){
return await this.driver.findElement(By.xpath(labelCardDeleteConfirm.replace('%NAME%', name)));
}
}
module.exports = labelsTab;

View File

@ -1,25 +0,0 @@
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const variablesFilter = '[data-testid=search-widget]';
//const addMemberButton = '[data-testid=flex-box] [data-testid=button]';
const urlCtx = 'members';
class membersTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: variablesFilter},
// {type: 'css', selector: addMemberButton},
]
);
}
}
module.exports = membersTab;

View File

@ -1,27 +0,0 @@
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const tabHeader = '//*[@data-testid=\'flex-box\'][.//h5]';
const warningHeader = '//*[@data-testid=\'flex-box\']//p';
const renameButton = '[data-testid=button][title=\'Rename\']';
const urlCtx = 'about';
class orgProfileTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'xpath', selector: tabHeader},
{type: 'xpath', selector: warningHeader},
{type: 'css', selector: renameButton},
]
);
}
}
module.exports = orgProfileTab;

View File

@ -1,33 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const { By } = require('selenium-webdriver');
const tabsCss = '[data-testid=tabs]';
const tabsXpath = '//*[@data-testid=\'tabs\']';
const urlCtx = 'settings';
class settingsPage extends influxPage {
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: tabsCss}], urlCtx);
}
async isTabLoaded(tabUrlPart, selectors = undefined){
if(selectors) {
await super.isLoaded(selectors.concat([{type: 'css', selector: tabsCss}]), tabUrlPart);
}else{
await super.isLoaded([{type: 'css', selector: tabsCss}], tabUrlPart);
}
}
async getTabByName(name){
return await this.driver.findElement(By.xpath(`${tabsXpath}//div[@data-testid='${name.toLowerCase()}--tab']`));
}
}
module.exports = settingsPage;

View File

@ -1,115 +0,0 @@
const { By } = require('selenium-webdriver');
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const templatesFilter = '[data-testid=search-widget]';
const importTemplateHeaderButton = '//*[@data-testid=\'button\'][.//*[text()=\'Import Template\']]';
const sortTypeButton = '[data-testid=resource-sorter--button]';
const nameSort = '[data-testid=resource-list--sorter]:nth-of-type(1)';
const templatesTypeFilterButton = '[data-testid=select-group--option][title=\'Static Templates\']';
const userTemplatesRadioButton = '[data-testid=select-group--option][title=\'User Templates\']';
const resourceList = '[data-testid=resource-list]';
const templateCardNames = '[data-testid=template-card--name]';
const importTemplateEmptyButton = '[data-testid=empty-state] [data-testid=button]';
const templateCardByName = '//*[@data-testid=\'template-card\'][.//*[text() = \'%NAME%\']]';
const templateCardCtxDelete = '//*[@data-testid=\'template-card\'][.//*[text() = \'%NAME%\']]//*[@data-testid=\'context-delete-menu\']';
const templateCardDeleteConfirm = '//*[@data-testid=\'template-card\'][.//*[text() = \'%NAME%\']]//*[@data-testid=\'context-delete-task\']';
const urlCtx = 'templates';
//import template popup
const importTemplateUploadButton = '[data-testid=overlay--body] [data-testid=select-group--option][title=Upload]';
const importTemplatePasteButton = '[data-testid=overlay--body] [data-testid=select-group--option][title=Paste]';
const importTemplateJSONTextArea = '[data-testid=overlay--body] [data-testid=import-overlay--textarea]';
const importTemplateDragNDrop = '[data-testid=overlay--body] input[type=file]';
const importTemplateSubmitButton = '[data-testid=\'submit-button Template\']';
class templatesTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: templatesFilter},
{type: 'xpath', selector: importTemplateHeaderButton},
{type: 'css', selector: sortTypeButton},
{type: 'css', selector: templatesTypeFilterButton},
{type: 'css', selector: resourceList},
]
);
}
async getTemplateCardNames(){
return await this.driver.findElements(By.css(templateCardNames));
}
async getUserTemplatesRadioButton(){
return await this.driver.findElement(By.css(userTemplatesRadioButton));
}
async getImportTemplateEmptyButton(){
return await this.driver.findElement(By.css(importTemplateEmptyButton));
}
async getImportTemplateUploadButton(){
return await this.driver.findElement(By.css(importTemplateUploadButton));
}
async getImportTemplatePasteButton(){
return await this.driver.findElement(By.css(importTemplatePasteButton));
}
async getImportTemplateHeaderButton(){
return await this.driver.findElement(By.xpath(importTemplateHeaderButton));
}
async getImportTemplateJSONTextArea(){
return await this.driver.findElement(By.css(importTemplateJSONTextArea));
}
static getImportTemplateJSONTextAreaSelector(){
return { type: 'css', selector: importTemplateJSONTextArea};
}
async getImportTemplateDragNDrop(){
return await this.driver.findElement(By.css(importTemplateDragNDrop));
}
async getImportTemplateSubmitButton(){
return await this.driver.findElement(By.css(importTemplateSubmitButton));
}
async getTemplateCardByName(name){
return await this.driver.findElement(By.xpath(templateCardByName.replace('%NAME%', name)));
}
static getTemplateCardSelectorByName(name){
return { type: 'xpath', selector: templateCardByName.replace('%NAME%', name) };
}
async getTemplatesFilter(){
return await this.driver.findElement(By.css(templatesFilter));
}
async getSortTypeButton(){
return await this.driver.findElement(By.css(sortTypeButton));
}
async getNameSort(){
return await this.driver.findElement(By.css(nameSort));
}
async getTemplateCardCtxDelete(name){
return await this.driver.findElement(By.xpath(templateCardCtxDelete.replace('%NAME%', name)));
}
async getTemplateCardDeleteConfirm(name){
return await this.driver.findElement(By.xpath(templateCardDeleteConfirm.replace('%NAME%', name)));
}
}
module.exports = templatesTab;

View File

@ -1,250 +0,0 @@
const { By } = require('selenium-webdriver');
const settingsPage = require(__srcdir + '/pages/settings/settingsPage.js');
const basePage = require(__srcdir + '/pages/basePage.js');
const variablesFilter = '[data-testid=search-widget]';
const createVariableHeader = '[data-testid=\'tabbed-page--header\'] [data-testid=add-resource-dropdown--button]';
const nameSort = '[data-testid=resource-list--sorter]:nth-of-type(1)';
const typeSort = '[data-testid=resource-list--sorter]:nth-of-type(2)';
const createVariableEmpty = '[data-testid=resource-list--body] [data-testid=add-resource-dropdown--button]';
const createVariableItem = '[data-testid=add-resource-dropdown--%ITEM%]';
const variableCardNamed = '//*[@data-testid=\'resource-card variable\'][.//*[text()=\'%NAME%\']]';
const variableCardNames = '[data-testid^=\'variable-card--name\'] span';
const variableCardName = '//*[@data-testid=\'variable-card--name %NAME%\']//span[text()=\'%NAME%\']';
const variableCardContextMenu = '//*[@data-testid=\'resource-card variable\'][.//span[text()=\'%NAME%\']]//*[@data-testid=\'context-menu\']';
const variableCardContextMenuItem = '//*[@data-testid=\'resource-card variable\'][.//span[text()=\'%NAME%\']]//*[button[@data-testid=\'context-menu\']]//button[text()=\'%ITEM%\']';
const variableCardContextDelete = '//*[@data-testid=\'resource-card variable\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'context-delete-menu\']';
const variableCardContextDeleteConfirm = '//*[@data-testid=\'resource-card variable\'][.//span[text() = \'%NAME%\']]//*[@data-testid=\'context-delete-variable\']';
const urlCtx = 'variables';
// import variable popup
const uploadRadioButton = '[data-testid=overlay--body] [data-testid=select-group--option][title=Upload]';
const pasteRadioButton = '[data-testid=overlay--body] [data-testid=select-group--option][title=Paste]';
const dragNDropFile = 'input[type=file]'; //N.B. has display:none
const importButton = '[data-testid=overlay--footer] [data-testid=\'submit-button Variable\']';
const pasteJSONTextarea = '[data-testid=overlay--body] [data-testid=import-overlay--textarea]';
const importVariableDragNDropHeader = '.drag-and-drop--header';
// create variable popup
const createVarPopupCreateButton = '[data-testid=overlay--container] button[title=\'Create Variable\']';
const createVariableNameInput = '[data-testid=overlay--body] [data-testid=input-field]';
const createVariableTypeDropdown = '[data-testid=\'variable-type-dropdown--button\']';
const createVariableQueryCodeMirror = '.CodeMirror';
const createVariableQueryMonacoEdit = '.monaco-editor';
const createVariableTextArea = '[data-testid=overlay--body] [data-testid=textarea]';
const createVariableTypeDropdownItem = '[data-testid=\'variable-type-dropdown-%ITEM%\']';
const createVariableDefaultValDropdown = '//*[@data-testid=\'form--element\'][.//*[text() = \'Select A Default\']]//*[contains(@data-testid,\'dropdown--button\')]';
const createVariableInfoPara = '//*[@data-testid=\'grid--column\'][p[contains(text(), \'ontains\')]]';
const createVariableDefaultValDropdownItem = '[data-testid=dropdown-item][id=\'%ITEM%\']';
const createVariableDefaultValCSVDropdownItem = '//*[@data-testid=\'dropdown-item\']//*[text() = \'%ITEM%\']';
// edit variable popup
const editVariableTypeDropdown = '[data-testid=\'variable-type-dropdown--button\']';
const editVariableTypeDropdownItem = '[data-testid=\'variable-type-dropdown-%ITEM%\']';
const editVariableNameInput = '//*[@data-testid=\'form--element\'][.//*[text()=\'Name\']]//input';
const editWarnVariablSubmit = '[data-testid=danger-confirmation-button]';
const editVariableNameChangeSubmit = '[data-testid=rename-variable-submit]';
//Warning popup
const updateNameNameInput = '[data-testid=overlay--body] [data-testid=rename-variable-input]';
class variablesTab extends settingsPage{
constructor(driver){
super(driver);
}
async isTabLoaded(){
await super.isTabLoaded(urlCtx,
[
{type: 'css', selector: variablesFilter},
{type: 'css', selector: createVariableHeader},
basePage.getSortTypeButtonSelector()
//{type: 'css', selector: nameSort},
//{type: 'css', selector: typeSort},
]
);
}
async getVariablesFilter(){
return await this.driver.findElement(By.css(variablesFilter));
}
async getCreateVariableHeader(){
return await this.driver.findElement(By.css(createVariableHeader));
}
async getCreateVariableEmpty(){
return await this.driver.findElement(By.css(createVariableEmpty));
}
async getCreateVariableItem(item){
return await this.driver.findElement(By.css(createVariableItem.replace('%ITEM%', item)));
}
async getPasteRadioButton(){
return await this.driver.findElement(By.css(pasteRadioButton));
}
async getUploadRadioButton(){
return await this.driver.findElement(By.css(uploadRadioButton));
}
async getDragNDropFile(){
return await this.driver.findElement(By.css(dragNDropFile));
}
static getDragNDropFileSelector(){
return { type: 'css', selector: dragNDropFile};
}
async getImportButton(){
return await this.driver.findElement(By.css(importButton));
}
async getCreateVariableNameInput(){
return await this.driver.findElement(By.css(createVariableNameInput));
}
async getCreateVariableTypeDropdown(){
return await this.driver.findElement(By.css(createVariableTypeDropdown));
}
async getCreateVariableQueryCodeMirror(){
return await this.driver.findElement(By.css(createVariableQueryCodeMirror));
}
static getCreateVariableQueryCodeMirrorSelector(){
return {type: 'css', selector: createVariableQueryCodeMirror };
}
async getCreateVariableQueryMonacoEdit(){
return await this.driver.findElement(By.css(createVariableQueryMonacoEdit));
}
static getCreateVariableQueryMonacoEditSelector(){
return {type: 'css', selector: createVariableQueryMonacoEdit};
}
async getCreateVariableTextArea(){
return await this.driver.findElement(By.css(createVariableTextArea));
}
static getCreateVariableTextAreaSelector(){
return {type: 'css', selector: createVariableTextArea};
}
async getPasteJSONTextarea(){
return await this.driver.findElement(By.css(pasteJSONTextarea));
}
static getPasteJSONTextareaSelector(){
return { type: 'css', selector: pasteJSONTextarea};
}
async getCreateVariableTypeDropdownItem(item){
return await this.driver.findElement(By.css(createVariableTypeDropdownItem
.replace('%ITEM%', item.toLowerCase())));
}
async getCreateVariableDefaultValDropdown(){
return await this.driver.findElement(By.xpath(createVariableDefaultValDropdown));
}
static getCreateVariableDefaultValDropdownSelector(){
return { type: 'xpath', selector: createVariableDefaultValDropdown};
}
async getCreateVariableInfoPara(){
return await this.driver.findElement(By.xpath(createVariableInfoPara));
}
static getCreateVariableInfoParaSelector(){
return { type: 'xpath', selector: createVariableInfoPara};
}
async getImportVariableDragNDropHeader(){
return await this.driver.findElement(By.css(importVariableDragNDropHeader));
}
async getVariableCardNamed(name){
return await this.driver.findElement(By.xpath(variableCardNamed.replace('%NAME%', name)));
}
static getVariableCardSelectorByName(name){
return { type: 'xpath', selector: variableCardNamed.replace('%NAME%', name)};
}
async getCreateVariableDefaultValDropdownItem(item){
return await this.driver.findElement(By.css(createVariableDefaultValDropdownItem.replace('%ITEM%', item)));
}
async getCreateVariableDefaultValCSVDropdownItem(item){
return await this.driver.findElement(By.xpath(createVariableDefaultValCSVDropdownItem.replace('%ITEM%', item)));
}
async getVariableCardNames(){
return await this.driver.findElements(By.css(variableCardNames));
}
async getVariableCardName(name){
return await this.driver.findElement(By.xpath(variableCardName.replace(/%NAME%/g, name)));
}
async getNameSort(){
return await this.driver.findElement(By.css(nameSort));
}
async getVariableCardContextMenu(name){
return await this.driver.findElement(By.xpath(variableCardContextMenu.replace('%NAME%', name)));
}
async getVariableCardContextMenuItem(name, item){
return await this.driver.findElement(By.xpath(variableCardContextMenuItem
.replace('%NAME%', name)
.replace('%ITEM%', item)));
}
async getUpdateNameNameInput(){
return await this.driver.findElement(By.css(updateNameNameInput));
}
async getEditVariableTypeDropdown(){
return await this.driver.findElement(By.css(editVariableTypeDropdown));
}
async getEditVariableTypeDropdownItem(item){
return await this.driver.findElement(By.css(editVariableTypeDropdownItem.replace('%ITEM%', item.toLowerCase())));
}
async getEditVariableNameInput(){
return await this.driver.findElement(By.xpath(editVariableNameInput));
}
async getVariableCardContextDelete(name){
return await this.driver.findElement(By.xpath(variableCardContextDelete.replace('%NAME%', name)));
}
async getVariableCardContextDeleteConfirm(name){
return await this.driver.findElement(By.xpath(variableCardContextDeleteConfirm.replace('%NAME%', name)));
}
async getEditVariablWarnSubmit(){
return await this.driver.findElement(By.css(editWarnVariablSubmit));
}
async getEditVariableNameChangeSubmit(){
return await this.driver.findElement(By.css(editVariableNameChangeSubmit));
}
async getCreateVarPopupCreateButton(){
return await this.driver.findElement(By.css(createVarPopupCreateButton));
}
}
module.exports = variablesTab;

View File

@ -1,51 +0,0 @@
const basePage = require(__srcdir + '/pages/basePage.js');
const { By } = require('selenium-webdriver');
const heading = '.splash-page--heading';
const influxLogo = '[data-testid=logo--influxdb-cloud]';
const versionInfo = '.version-info p';
const creditsLink = '.splash-page--credits a';
const nameInput = 'input[name=username]'; //TODO - see if data-testid can be updated - currently 'input-field' for both name and password inputds
const passwordInput = 'input[name=password]'; //TODO - see if data-testid can be updated
const signinButton = '[data-testid=button]';
const urlCtx = 'signin';
class signinPage extends basePage{
constructor(driver){
super(driver);
this.urlCtx = urlCtx;
}
async getHeading(){
return await this.driver.findElement(By.css(heading));
}
async getVersionInfo(){
return await this.driver.findElement(By.css(versionInfo));
}
async getCreditsLink(){
return await this.driver.findElement(By.css(creditsLink));
}
async getNameInput(){
return await this.driver.findElement(By.css(nameInput));
}
async getPasswordInput(){
return await this.driver.findElement(By.css(passwordInput));
}
async getSigninButton(){
return await this.driver.findElement(By.css(signinButton));
}
async getInfluxLogo(){
return await this.driver.findElement(By.css(influxLogo));
}
}
module.exports = signinPage;

View File

@ -1,77 +0,0 @@
const influxPage = require(__srcdir + '/pages/influxPage.js');
const basePage = require(__srcdir + '/pages/basePage.js');
const { By } = require('selenium-webdriver');
const filterTasks = '[data-testid=search-widget]';
const inactiveToggle = '[data-testid=slide-toggle]';
const createTaskDropdownHeader = '[data-testid=page-control-bar--right] [data-testid=add-resource-dropdown--button]';
const nameSortButton = '[data-testid=resource-list--sorter]:nth-of-type(1)';
const activeSortButton = '[data-testid=resource-list--sorter]:nth-of-type(2)';
const scheduleSortButton = '[data-testid=resource-list--sorter]:nth-of-type(3)';
const lastCompletedSortButton = '[data-testid=resource-list--sorter]:nth-of-type(4)';
// following is only present until first task is created, so not good candidate for isLoaded check
const createTaskDropdownBody = '[data-testid=resource-list--body] [data-testid=add-resource-dropdown--button]';
const taskCardByName = '//*[@data-testid=\'task-card\'][.//span[text() = \'%NAME%\']]';
const urlCtx = 'tasks';
class tasksPage extends influxPage{
constructor(driver){
super(driver);
}
async isLoaded(){
await super.isLoaded([{type: 'css', selector: filterTasks},
{type: 'css', selector: inactiveToggle} ,
{type: 'css', selector: createTaskDropdownHeader} ,
// {type: 'css', selector: nameSortButton},
basePage.getSortTypeButtonSelector(),
//{type: 'css', selector: activeSortButton},
//{type: 'css', selector: scheduleSortButton},
//{type: 'css', selector: lastCompletedSortButton}
], urlCtx);
}
async getFilterTasks(){
return await this.driver.findElement(By.css(filterTasks));
}
async getInactiveToggle(){
return await this.driver.findElement(By.css(inactiveToggle));
}
async getCreateTaskDropdownHeader(){
return await this.driver.findElement(By.css(createTaskDropdownHeader));
}
async getNameSortButton(){
return await this.driver.findElement(By.css(nameSortButton));
}
async getActiveSortButton(){
return await this.driver.findElement(By.css(activeSortButton));
}
async getScheduleSortButton(){
return await this.driver.findElement(By.css(scheduleSortButton));
}
async getLastCompetedSortButton(){
return await this.driver.findElement(By.css(lastCompletedSortButton));
}
async getCreateTaskDropdownBody(){
return await this.driver.findElement(By.css(createTaskDropdownBody));
}
async getTaskCardByName(name){
return await this.driver.findElement(By.xpath(taskCardByName.replace('%NAME%', name)));
}
}
module.exports = tasksPage;

View File

@ -1,42 +0,0 @@
import { AfterAll, Given, Then, When } from 'cucumber';
const cloudSteps = require(__srcdir + '/steps/cloudSteps.js');
let cSteps = new cloudSteps(__wdriver);
When(/^open the cloud page in "(.*?)" milliseconds$/, {timeout: 15000}, async (maxDelay) => {
await cSteps.openCloudPage(parseInt(maxDelay));
});
/*
When(/^setup default cloud user$/, async () => {
await cSteps.setupDefaultCloudUser();
});
*/
When(/^I open the cloud login$/, {timeout: 30000}, async () => {
await cSteps.openCloudLogin();
});
When(/^log in to the cloud$/, async () => {
await cSteps.logInToCloud();
});
When(/^log in to the cloud in "(.*)" milliseconds$/, {timeout: 15000}, async (maxDelay) => {
await cSteps.logInToCloudTimed(parseInt(maxDelay));
});
When(/^I logout to account info in "(.*)" milliseconds$/, {timeout: 15000}, async (maxDelay) => {
await cSteps.logoutToAccountInfoTimed(parseInt(maxDelay));
});
When(/^I logout to login page in "(.*)" milliseconds$/, {timeout: 15000}, async(maxDelay) => {
await cSteps.logoutToLoginTimed(parseInt(maxDelay));
});
When(/^wait "(.*?)" with delay "(.*?)"$/, async (sleep, delay) => {
await cSteps.performanceBogusTest(sleep, parseInt(delay));
});
Then(/^the cloud login page is loaded$/, {timeout: 15000}, async () => {
await cSteps.verifyCloudLoginPageLoaded();
});

View File

@ -1,414 +0,0 @@
import { AfterAll, Given, Then, When } from 'cucumber';
import {flush} from '../../utils/influxUtils';
const baseSteps = require(__srcdir + '/steps/baseSteps.js');
const signinSteps = require(__srcdir + '/steps/signin/signinSteps.js');
const influxSteps = require(__srcdir + '/steps/influx/influxSteps.js');
const influxUtils = require(__srcdir + '/utils/influxUtils.js');
let bSteps = new baseSteps(__wdriver);
let sSteps = new signinSteps(__wdriver);
let iSteps = new influxSteps(__wdriver);
Given(/^I reset the environment$/, async () => {
await bSteps.driver.sleep(1000); //since gets called after scenarios, need a short delay to avoid promise resolution issues
await bSteps.resetEnvironment();
//await flush();
});
/*
Before(() => {
})
BeforeAll(() => {
})
After(() => {
console.log("DEBUG After hook")
})
*/
AfterAll(async() => {
await bSteps.driver.close();
});
When(/^clear browser storage$/, async () => {
await bSteps.clearBrowserLocalStorage();
});
Then(/^the success notification says "(.*?)"$/, async message => {
await bSteps.isNotificationMessage(message);
});
Then(/^the success notification contains "(.*?)"$/, async text => {
//can be used in template or outline - some cases may needed to be skipped
if(text.toLowerCase() !== 'skip') {
await bSteps.containsNotificationText(text);
}
});
Then(/^the primary notification contains "(.*)"$/, async text => {
if(text.toLowerCase() !== 'skip') {
await bSteps.containsPrimaryNotificationText(text);
}
});
Then(/^the error notification contains "(.*?)"$/, async text => {
await bSteps.containsErrorNotificationText(text);
});
When(/^close all notifications$/, async() => {
await bSteps.closeAllNotifications();
});
// newUser if not DEFAULT should follow {username: 'name', password: 'password', org: 'org', bucket: 'bucket'}
Given(/^run setup over REST "(.*?)"$/, async( newUser ) => {
//await influxUtils.flush();
if(newUser === 'DEFAULT'){
await influxUtils.setupUser(__defaultUser);
}else{
let user = JSON.parse(newUser);
if(user.password.length < 8 ){
throw Error(`Password: ${user.password} is shorter than 8 chars`);
}
await influxUtils.setupUser(user);
}
});
Given(/^run setup user "(.*)"$/, {timeout: 15000}, async newUser => {
await influxUtils.setupNewUser(newUser);
});
Given(/^run setup over CLI docker "(.*?)"$/, async( newUser ) => {
if(newUser === 'DEFAULT'){
await influxUtils.setupUserDockerCLI(__defaultUser);
}else{
let user = JSON.parse(newUser);
if(user.password.length < 8 ){
throw Error(`Password: ${user.password} is shorter than 8 chars`);
}
await influxUtils.setupUser(user);
}
await bSteps.driver.sleep(1000); //give system chance to write everything down
});
When(/^API sign in user "(.*?)"$/, async username => {
await influxUtils.signInAxios((username === 'DEFAULT') ? __defaultUser.username : username).then(async () => {
// await sSteps.driver.sleep(1500)
}).catch(async err => {
console.log('ERROR ' + err);
throw(err);
});
});
When(/^API end session$/, async() => {
await influxUtils.endSession();
});
When(/^UI sign in user "(.*?)"$/, {timeout: 15000}, async username => {
let user = influxUtils.getUser((username === 'DEFAULT') ? __defaultUser.username : username);
await sSteps.signin(user);
//await sSteps.driver.sleep(1500)
});
When(/^write basic test data for org "(.*?)" to bucket "(.*?)"$/, async (org,bucket) => {
await influxUtils.writeData(org,bucket);
});
When(/^write sine data for org "(.*?)" to bucket "(.*?)"$/, async (org, bucket) =>{
let nowNano = new Date().getTime() * 1000000;
let intervalNano = 600 * 1000 * 1000000; //10 min in nanosecs
let lines = [];
let recCount = 256;
let startTime = nowNano - (recCount * intervalNano);
for(let i = 0; i < recCount; i++){
lines[i] = 'sinus point=' + Math.sin(i) + ' ' + (startTime + (i * intervalNano));
}
console.log('DEBUG lines: ');
lines.forEach((line) => {
console.log(line);
});
await influxUtils.writeData(org, bucket, lines);
});
//For Inspection purposes
When(/^simple query data "(.*)" for org of user "(.*)" from bucket "(.*)" over "(.*)"$/, async (items, userName, bucket, period) => {
let dataDef = JSON.parse(items.replace(/\\/g,""));
let targetBucket = (bucket === 'DEFAULT') ? __defaultUser.bucket : 'fred';
let query = `from(bucket: "${targetBucket}")
|> range(start: ${period})
|> filter(fn: (r) => r._measurement == "${dataDef.name}")
|> filter(fn: (r) => r._field == "${dataDef.measurement}")`;
let results = await influxUtils.query(userName, query);
console.info('INFO results: ' + JSON.stringify(results));
});
When(/^API create a dashboard named "(.*?)" for user "(.*?)"$/, async (name, username) => {
let user = await influxUtils.getUser(username);
let dashb = await influxUtils.createDashboard(name, user.orgid);
if(user.dashboards === undefined){
user.dashboards = new Object();
}
//Save dashboard for later use
user.dashboards[name] = dashb;
});
//Troubleshoot method
When(/^API get all dashboards for user "(.*?)"$/, async user => {
let dboards = await influxUtils.getDashboards(user);
console.info(`DUMP dboards for user (${user}):\n ${JSON.stringify(dboards)}`);
});
When(/^API create a bucket named "(.*)" for user "(.*)"$/, async (bucket, username) => {
let user = await influxUtils.getUser((username === 'DEFAULT') ? __defaultUser.username : username);
await influxUtils.createBucket(user.orgid, user.org, bucket);
});
When(/^API create a label "(.*)" described as "(.*)" with color "(.*)" for user "(.*)"$/,
async (labelName, labelDescr, labelColor, userName) => {
await influxUtils.createLabel(userName, labelName, labelDescr, labelColor);
});
When(/^open page "(.*?)" for user "(.*?)"$/, async (page, username) => {
let user = await influxUtils.getUser((username === 'DEFAULT') ? __defaultUser.username : username);
let ctx = 'orgs/' + user.orgid;
if(page !== 'HOME'){
ctx += `/${page}`;
}
await bSteps.openContext(ctx);
await iSteps.isLoaded();
//await bSteps.driver.sleep(3000)
});
Then(/^the form element error message is "(.*)"$/, async msg => {
await bSteps.verifyElementErrorMessage(msg);
});
Then(/^the form element error message is not shown$/, async () => {
await bSteps.verifyNoElementErrorMessage();
});
Then(/^no form input error icon is shown$/, async () => {
await bSteps.verifyNoFormInputErrorIcon();
});
Then(/^a form input error icon is shown$/, async () => {
await bSteps.verifyInputErrorIcon();
});
When(/^click the Popup Wizard continue button$/, {timeout: 15000}, async() => {
await bSteps.clickPopupWizardContinue();
//await bSteps.driver.sleep(10000);
});
When(/^click the wizard previous button$/, async () => {
await bSteps.clickPopupWizardPrevious();
});
When(/^click the Popup Wizard done button$/, async () => {
await bSteps.clickPopupWizardContinue();
});
Then(/^the popup wizard continue button is disabled$/, async() => {
await bSteps.verifyWizardContinueButtonDisabled();
});
When(/^dismiss the popup$/, async () => {
await bSteps.dismissPopup();
});
When(/^click popup cancel button$/, async () => {
await bSteps.clickPopupCancelBtn();
});
When(/^click popup cancel simple button$/, async () => {
await bSteps.clickPopupCancelBtnSimple();
});
Then(/^popup is not loaded$/, async () => {
await bSteps.verifyPopupNotPresent();
});
When(/^click popup submit button$/, async () => {
await bSteps.clickPopupSubmitButton();
});
Then(/^the popup wizard step state text contains "(.*)"$/, async text => {
await bSteps.verifyPopupWizardStepStateText(text);
});
Then(/^the popup wizard step is in state "(.*)"$/, async state => {
await bSteps.verifyPopupWizardStepState(state);
});
Then(/^the popup wizard import file header contains "(.*)"$/, async text => {
await bSteps.verifyPopupFileUploadHeaderText(text);
});
When(/^generate a line protocol testdata file "(.*)" based on:$/, async (filePath, def) => {
await influxUtils.genLineProtocolFile(filePath, def);
});
When(/^generate a line protocol testdata for user "(.*)" based on:$/, async (userName, def) => {
//await influxUtils.writeLineProtocolData((user === 'DEFAULT')? __defaultUser: await influxUtils.getUser(user),
// def);
await influxUtils.writeLineProtocolData(userName, def);
});
When(/^create the "(.*)" variable "(.*)" with default "(.*)" for user "(.*)" with values:$/,
async(type, name, defVal, userName, values) => {
type = type === 'csv' ? 'constant' : type.toLowerCase();
//let orgID = influxUtils.getUser((user === 'DEFAULT') ? __defaultUser.username : user).orgid;
await influxUtils.createVariable(userName, name, type, values, defVal)
});
//For troubleshooting - up to 5 min
When(/^wait "(.*)" seconds$/, {timeout: 5 * 60 * 1000}, async secs => {
await bSteps.driver.sleep(parseInt(secs) * 1000);
});
When(/^force page refresh$/, async ()=> {
await bSteps.driver.navigate().refresh();
});
When(/^press the "(.*)" key$/, async key => {
await bSteps.pressKeyAndWait(key);
});
When(/^create a new template from the file "(.*)" for user "(.*)"$/, async (filepath, userName) => {
//let orgID = influxUtils.getUser((user === 'DEFAULT') ? __defaultUser.username : user).orgid;
await influxUtils.createTemplateFromFile(userName, filepath);
});
When(/^create check over API from file "(.*)" for user "(.*)"$/, async (filepath, userName) => {
//let orgID = influxUtils.getUser((user === 'DEFAULT') ? __defaultUser.username : user).orgid;
await influxUtils.createAlertCheckFromFile(userName, filepath);
});
When(/^remove file "(.*)" if exists$/, async filePath => {
await influxUtils.removeFileIfExists(filePath);
});
Then(/^the file "(.*)" has been downloaded$/, async filePath => {
await bSteps.verifyFileExists(filePath);
});
When(/^remove files "(.*)" if exists$/, async regex => {
await influxUtils.removeDownloadFilesByRegex(regex);
});
Then(/^a file matching "(.*)" exists$/, async regex => {
await bSteps.verifyDownloadFileMatchingRegexExists(regex);
});
When(/^verify first CSV file matching "(.*)" as containing$/, async (path, dataDesc) => {
let datdescr = JSON.parse(dataDesc);
await bSteps.verifyFirstCSVFileMatching(path, datdescr);
});
When(/^get console log$/, async () => {
await bSteps.getConsoleLog();
});
When(/^write message "(.*)" to console log$/, async msg => {
await bSteps.writeMessageToConsoleLog(msg);
});
When(/^send keys "(.*)"$/, async keys => {
await bSteps.sendKeysToCurrent(keys);
});
When(/^start live data generator$/, async def => {
bSteps.startLiveDataGenerator(def);
});
When(/^stop live data generator$/, async () => {
bSteps.stopLiveDataGenerator();
});
When(/^click the sort type dropdown$/, async () => {
await bSteps.clickSortTypeDropdown();
});
When(/^click sort by item "(.*)"$/, async item => {
await bSteps.clickSortByListItem(item);
});
Then(/^the add label popover is not present$/, async () => {
await bSteps.verifyAddLabelsPopopverNotPresent();
});
Then(/^the add label popover is present$/, async () => {
await bSteps.verifyAddLabelPopoverVisible();
});
Then(/^the add label popover contains the labels$/, async labels => {
await bSteps.verifyLabelPopoverContainsLabels(labels);
});
When(/^click the label popover item "(.*)"$/, async item => {
await bSteps.clickLabelPopoverItem(item);
});
Then(/^the add label popover does not contain the labels:$/, { timeout: 10000}, async labels => {
await bSteps.verifyLabelPopoverDoesNotContainLabels(labels);
});
When(/^set the label popover filter field to "(.*)"$/, async val => {
await bSteps.setLabelPopoverFilter(val);
});
Then(/^the label popover contains create new "(.*)"$/, async name => {
await bSteps.verifyLabelPopoverCreateNew(name);
});
Then(/^the add label popover does not contain create new$/, async () => {
await bSteps.verifyLabelPopupNoCreateNew();
});
When(/^clear the popover label selector filter$/, async () => {
await bSteps.clearDashboardLabelsFilter();
});
//For Inspection
When(/^get authorizations for user "(.*)"$/, async userName => {
let auths = await influxUtils.getAuthorizations(userName);
console.info(`Authorizations for ${userName}:\n${JSON.stringify(auths)}`);
});

View File

@ -1,598 +0,0 @@
import { Then, When } from 'cucumber';
const cellOverlaySteps = require(__srcdir + '/steps/dashboards/cellOverlaySteps.js');
let celOvSteps = new cellOverlaySteps(__wdriver);
Then(/^the cell edit overlay is loaded as "(.*)"$/, {timeout: 10000}, async name => {
await celOvSteps.verifyCellOverlayIsLoaded(name);
});
When(/^get the current cell edit preview graph$/, async () => {
await celOvSteps.getCurrentCellEditPreviewGraph();
});
When(/^name dashboard cell "(.*)"$/, async name => {
await celOvSteps.nameDashboardCell(name);
});
When(/^click dashboard cell edit cancel button$/, async () => {
await celOvSteps.clickDashboardCellEditCancel();
});
When(/^click dashboard cell save button$/, async () => {
await celOvSteps.clickDashboardCellSave();
});
When(/^click the cell edit Time Range Dropdown$/, async () => {
await celOvSteps.clickCellEditTimeRangeDropdown();
});
When(/^select the cell edit Time Range "(.*)"$/, async item => {
await celOvSteps.selectCellEditTimeRangeItem(item);
});
When(/^click the cell edit Script Editor button$/, async () => {
await celOvSteps.clickCellEditScriptEditorButton();
});
When(/^paste into cell edit Script Editor$/, { timeout: 20000 }, async text => {
await celOvSteps.pasteIntoCellEditScriptEditor(text);
});
When(/^clear the cell edit Script Editor$/, { timeout: 20000 }, async () => {
await celOvSteps.clearCellEditScriptEditor();
});
Then(/^the time machine cell edit submit button is disabled$/, async () => {
await celOvSteps.verifyCellEditSubmitDisabled();
});
Then(/^the time machine cell edit submit button is enabled$/, async () => {
await celOvSteps.verifyCellEditSubmitEnabled();
});
When(/^click the time machine cell edit submit button$/, async () => {
await celOvSteps.clickCellEditSubmitButton();
});
Then(/^the time machine cell edit preview graph is shown$/, async() => {
await celOvSteps.verifyCellEditPreviewGraphVisible();
});
Then(/^the time machine cell edit preview axes are shown$/, async() => {
await celOvSteps.verifyCellEditPreviewAxesVisible();
});
Then(/^the cell edit preview graph is changed$/, async() => {
await celOvSteps.verifyCellEditPreviewGraphChanged();
});
When(/^click the cell edit save button$/, async () => {
await celOvSteps.clickCellEditSaveButton();
});
When(/^click on the cell edit name$/, async () => {
await celOvSteps.clickCellEditName();
});
When(/^change the cell edit name to "(.*)"$/, async name => {
await celOvSteps.updateCellName(name);
});
When(/^click the dashboard cell view type dropdown$/, async () => {
await celOvSteps.clickViewTypeDropdown();
});
Then(/^the dashboard cell view type dropdown list contains:$/, async itemList => {
await celOvSteps.verifyViewTypeListContents(itemList);
});
Then(/^the cell view type dropdown list is not present$/, async () => {
await celOvSteps.verifyViewTypeListNotPresent();
});
When(/^click cell view customize button$/, async () => {
await celOvSteps.clickCellViewCustomize();
});
Then(/^the view options container is present$/, async () => {
await celOvSteps.verifyViewOptionsContainerVisible();
});
Then(/^the view options container is not present$/, async () => {
await celOvSteps.verifyViewOptionsContainerNotPresent();
});
Then(/^the cell view customize button is highlighted$/, async () => {
await celOvSteps.verifyCellCustomizeButtonHighlight();
});
Then(/^the cell view customize button is not highlighted$/, async () => {
await celOvSteps.verifyCustomizeButtonNoHighlightd();
});
Then(/^the time machine view empty queries graph is visible$/, async () => {
await celOvSteps.verifyTMViewEmptyQueriesGraphVisible();
});
Then(/^the time machine view no results is visible$/, async () => {
await celOvSteps.verifyTMViewNoResultsVisible();
});
When(/^click time machine autorefresh dropdown$/, async () => {
await celOvSteps.clickTMAutorefreshDropdown();
});
Then(/^the time machine autorefresh dropdown list contains:$/, async itemList => {
await celOvSteps.verifyAutorefreshListContents(itemList);
});
When(/^select the time machine autorefresh rate "(.*)"$/, async item => {
await celOvSteps.clickTMAutorefreshItem(item);
});
Then(/^the time machine force refresh button is not present$/, async () => {
await celOvSteps.verifyTMAutorefreshForceButtonNotPresent();
});
Then(/^the time machine force refresh button is present$/, async () => {
await celOvSteps.verifyTMAutorefreshForceButtonVisible();
});
Then(/^the time machine autorefresh dropdown list is set to "(.*)"$/, async selected => {
await celOvSteps.verifyTMAutorefreshDropdownSelected(selected);
});
When(/^click time machine force refresh$/, async () => {
await celOvSteps.clickTMForceRefresh();
});
Then(/^the time machine Time Range dropdown list contains:$/, async itemList => {
await celOvSteps.verifyTMTimeRangeDropdownList(itemList);
});
Then(/^the time machine Time Range dropdown list is not present$/, async () => {
await celOvSteps.verifyTMTimeRangeDropdownListNotPresent();
});
Then(/^the time machine query builder is visible$/, async () => {
await celOvSteps.verifyTMQueryBuilderVisible();
});
Then(/^the time machine switch to Query Builder warning is present$/, async () => {
await celOvSteps.verifyTMQueryBuilderSwitchWarnVisible();
});
Then(/^the time machine switch to Query Builder warning is not present$/, async () => {
await celOvSteps.verifyTMQueryBuilderSwitchWarnNotPresent();
});
Then(/^the time machine flux editor is visible$/, async () => {
await celOvSteps.verifyTMFluxEditorVisible();
});
When(/^click the cell edit Query Builder button$/, async () => {
await celOvSteps.clickTMSwitch2QBuilder();
});
When(/^click the cell edit Query Builder confirm button$/, async () => {
await celOvSteps.clickTMSwitch2QBuilderConfirm();
});
When(/^click the time machine flux editor$/, async () => {
await celOvSteps.clickTMFluxEditor();
});
When(/^click the filter functions input$/, async () => {
await celOvSteps.clickTMFilterFunctionsInput();
});
Then(/^the time machine flux editor is not present$/, async () => {
await celOvSteps.verifyTMFluxEditorNotPresent();
});
Then(/^the edit cell bucket selector contains buckets:$/, async bucketList => {
await celOvSteps.verifyTMBucketListContents(bucketList);
});
When(/^click the time machine bucket selector item "(.*)"$/, async item => {
await celOvSteps.driver.sleep(500); //troubleshoot issue with click on wrong item
await celOvSteps.clickTMBucketSelectorItem(item);
});
Then(/^the bucket "(.*)" is not present in the time machine bucket selector$/, async bucket => {
await celOvSteps.verifyBucketNotInTMBucketList(bucket);
});
When(/^filter the time machine bucket selector with "(.*)"$/, async value => {
await celOvSteps.filterBucketListContents(value);
});
When(/^clear the time machine bucket selector filter$/, async () => {
await celOvSteps.clearBucketSelectorFilter();
});
Then(/^there are "(.*)" time machine builder cards$/, async count => {
await celOvSteps.verifyTMBuilderCardsSize(count);
});
Then(/^time machine builder card "(.*)" contains:$/, async (index,items) => {
await celOvSteps.verifyItemsInBuilderCard(index,items);
});
Then(/^the item "(.*)" in builder card "(.*)" is selected$/, async (item,index) => {
await celOvSteps.verifyItemSelectedInBuilderCard(index, item);
})
Then(/^time machine builder card "(.*)" contains the empty tag message$/, async index => {
await celOvSteps.verifyEmptyTagsInBuilderCard(index);
});
Then(/^there are no selected tags in time machine builder card "(.*)"$/, async index => {
await celOvSteps.verifyNoSelectedTagsInBuilderCard(index);
});
Then(/^the selector count for builder card "(.*)" contains the value "(.*)"$/, async (index,value) =>{
await celOvSteps.verifySelectorCountInBuilderCard(index,value);
});
Then(/^time machine builder card "(.*)" does not contain "(.*)"$/, async (index, item) => {
await celOvSteps.verifyItemNotInBuilderCard(index,item);
});
When(/^click the tag selector dropdown of builder card "(.*)"$/, async index => {
await celOvSteps.clickTagSelectorOfBuilderCard(index);
});
Then(/^the tag selector dropdown of builder card "(.*)" contains:$/, async (index,items) => {
await celOvSteps.verifyItemsInBuilderCardTagSelector(index,items);
});
When(/^click the tag selector dropdown item "(.*)" of builder card "(.*)"$/, async (item, index) => {
await celOvSteps.clickTagSelectorDropdownItemInBuilderCard(item,index);
});
When(/^click the tag "(.*)" in builder card "(.*)"$/, async (tag, cardIndex) => {
await celOvSteps.clickTagInBuilderCard(tag, cardIndex);
});
When(/^filter the tags in time machine builder card "(.*)" with "(.*)"$/, {timeout: 10000}, async (index,term) => {
await celOvSteps.filterBuilderCardListContents(index,term);
});
Then(/^time machine builder card "(.*)" is empty$/, async index => {
await celOvSteps.verifyBuilderCardEmpty(index);
});
When(/^clear the tags filter in time machine builder card "(.*)"$/, async index => {
await celOvSteps.clearTagsFilterInBuilderCard(index);
});
Then(/^the contents of tag selector dropodwn of build card "(.*)" are not present$/, async index => {
await celOvSteps.verifyBuilderCardTagSelectNotPresent(index);
});
Then(/^the selector counf for builder card "(.*)" is not present$/, async index => {
await celOvSteps.verifyBuilderCardSelectCountNotPresent(index);
});
Then(/^the delete button for builder card "(.*)" is not present$/, async index => {
await celOvSteps.verifyBuilderCardDeleteNotPresent(index);
});
When(/^click delete for builder card "(.*)"$/, async index => {
await celOvSteps.clickBuilderCardDelete(index);
});
Then(/^the time machine query builder function duration period is "(.*)"$/, async duration => {
await celOvSteps.verifyTMQueryBuilderFunctionDuration(duration);
});
When(/^click the custom function group$/, async () => {
await celOvSteps.clickCustomFunctionGroup();
});
When(/^click the time machine query builder function duration input$/, async () => {
await celOvSteps.clickTMQueryBuilderFunctionDuration();
});
When(/^click the time machine query builder function custom duration tab$/, async () => {
await celOvSteps.clickTMQueryBuilderCustomDuration();
});
When(/^click the time machine query builder function auto duration tab$/, async () => {
await celOvSteps.clickTMQueryBuilderAutoDuration();
});
Then(/^the query builder function duration suggestion drop down contains "(.*)" suggestions$/, async count => {
await celOvSteps.verifyTMQBFunctionDurationSuggestionCount(count);
});
Then(/^the query builder function duration suggestion drop down includes$/, async items => {
await celOvSteps.verifyTMQBFunctionDurationSuggestionItems(items);
});
When(/^click the query builder function duration suggestion "(.*)"$/, async item => {
await celOvSteps.clickTMQBFunctionDurationSuggestionItem(item);
});
Then(/^the query builder function list contains$/, async items => {
await celOvSteps.verifyTMQueryBuilderFunctionListItems(items);
});
Then(/^the query builder function list has "(.*)" items$/, async count => {
await celOvSteps.verifyQuerBuilderFunctionListItemCount(count);
});
When(/^filter the query builder function list with "(.*)"$/, async term => {
await celOvSteps.filterQueryBuilderFunctionList(term);
});
When(/^clear the query builder function lis filter$/, async () => {
await celOvSteps.clearQueryBuilderFunctionListFilter();
});
When(/^get metrics of time machine cell edit preview$/, async () => {
await celOvSteps.getTMPreviewMetrics();
});
When(/^get metrics of time machine query builder$/, async () => {
await celOvSteps.getTMPQueryAreaMetrics();
});
When(/^get time machine preview canvas$/, async () => {
await celOvSteps.getTMPreviewCanvas();
});
When(/^get time machine preview axes$/, async () => {
await celOvSteps.getTMPreviewCanvasAxes();
});
When(/^resize time machine preview area by "(.*)"$/, async dims => {
let deltaSize = JSON.parse(dims);
await celOvSteps.resizeTMPreviewBy(deltaSize);
});
Then(/^the time machine preview area has changed by "(.*)"$/, async dims => {
let deltaSize = JSON.parse(dims);
await celOvSteps.verifyTMPreviewAreaSizeChange(deltaSize);
});
Then(/^the time machine query builder area has changed by "(.*)"$/, async dims => {
let deltaSize = JSON.parse(dims);
await celOvSteps.verifyTMQBAreaSizeChange(deltaSize);
});
Then(/^the time machine preview canvas has changed$/, {timeout: 10000}, async () => {
await celOvSteps.verifyTMPreviewCanvasChange();
});
Then(/^the time machine preview canvas has not changed$/, {timeout: 1000}, async () => {
await celOvSteps.verifyTMPreviewCanvasNoChange();
});
Then(/^the time machine preview axes have changed$/, async () => {
await celOvSteps.verifyTMPreviewAxesChange();
});
Then(/^the time machine preview canvas is not present$/, async () => {
await celOvSteps.verifyTMPreviewCanvasNotPresent();
});
Then(/^the time machine preview canvas axes are not present$/, async () => {
await celOvSteps.verifyTMPreviewCanvasAxesNotPresent();
});
When(/^click the time machine query builder add query button$/, async () => {
await celOvSteps.clickTMAddQuery();
});
Then(/^the bucket selected in the current time machine query is "(.*)"$/, async bucket => {
await celOvSteps.verifyTMQueryBucketSelected(bucket);
});
Then(/^the tag selected in the current time machine query card "(.*)" is "(.*)"$/, async (index, tag) => {
await celOvSteps.verifyTMQueryCardSelected(index,tag);
});
Then(/^the functions selected in the current time machine query card are "(.*)"$/, async funcs => {
await celOvSteps.verifyTMQueryFunctionsSelected(funcs);
});
When(/^click the query builder function "(.*)"$/, async func => {
await celOvSteps.clickTMQBFunction(func);
});
Then(/^query "(.*)" is the active query in query builder$/, async title => {
await celOvSteps.verifyTMQBActiveQuery(title);
});
When(/^click on query "(.*)" in the query builder$/, async title => {
await celOvSteps.clickOnTMQBQueryTab(title);
});
When(/^right click on the time machine query tab title "(.*)"$/, async title => {
await celOvSteps.rightClickTMQBQueryTabTitle(title);
});
When(/^click the time machine query tab right click menu item "(.*)"$/, async item => {
await celOvSteps.clickTMQBQueryTabRightClickMenuItem(item);
});
When(/^enter "(.*)" into the time machine query tab name input$/, async name => {
await celOvSteps.enterNewTMQBQueryTabName(name);
});
Then(/^there is no time machine query tab named "(.*)"$/, async name => {
await celOvSteps.verifyNoTMQBQueryTabNamed(name);
});
When(/^click hide query of time machine query tab "(.*)"$/, async name => {
await celOvSteps.clickTMQBHideQuery(name);
});
When(/^right click the time machine query tab "(.*)"$/, async name => {
await celOvSteps.clickRightTMQBQuery(name);
});
When(/^click delete of time machine query tab "(.*)"$/, async name => {
await celOvSteps.clickTMQBDeleteQuery(name);
});
Then(/^there are "(.*)" time machine query tabs$/, async count => {
await celOvSteps.verifyTMQBNumberOfQueryTabs(count);
});
Then(/^the time machine script editor contains$/, async script => {
await celOvSteps.verifyTMQBScriptEditorContents(script);
});
When(/^change the time machine script editor contents to:$/, { timeout: 60000 }, async script => {
await celOvSteps.updateTMQBScriptEditorContents(script);
});
When(/^set the time machine script editor contents to:$/, {timeout: 60000}, async script => {
await celOvSteps.updateTMQBScriptEditorContents(script);
});
When(/^click the time machine switch to query builder button$/, async () => {
await celOvSteps.clickTMSwitch2QBuilder();
});
Then(/^the time machine empty graph error message is:$/, async msg => {
await celOvSteps.verifyTMEmptyGraphErrorMessage(msg);
});
When(/^close all time machine builder cards$/, async () => {
await celOvSteps.closeAllTMQBCards();
});
When(/^unselect any tags in time machine builder card "(.*)"$/, async index => {
await celOvSteps.deselectAllActiveTagsInTMQBCard(index);
});
Then(/^the time machine query edit function categories are displayed:$/, async cats => {
await celOvSteps.verifyTMQEFunctionCategoriesDisplayed(cats);
});
When(/^filter the time machine query edit function list with "(.*)"$/, async term => {
await celOvSteps.filterTMQEFunctionsList(term);
});
When(/^clear the time machine query edit function list filter$/, async () => {
await celOvSteps.clearTMQEFunctionsListFilter();
});
Then(/^the following function are visible in the time machine function list:$/, async funcs => {
await celOvSteps.verifyTMQEVisibleFunctions(funcs);
});
Then(/^the following function are not visible in the time machine function list:$/, {timeout: 20000}, async funcs => {
await celOvSteps.verifyTMQENotVisibleFunctions(funcs);
});
When(/^click the time machine query editor function "(.*)"$/, async func => {
await celOvSteps.clickTMQEFunction(func);
});
When(/^click inject the time machine query editor function "(.*)"$/, async func => {
await celOvSteps.clickInjectTMQEFunction(func);
});
When(/^hover over time machine query edit function "(.*)"$/, async func => {
await celOvSteps.hoverOverTMQEFunction(func);
});
Then(/^the time machine query edit function popup description contains:$/, async text => {
await celOvSteps.verifyTMQEFunctionPopupDescription(text);
});
Then(/^the time machine query edit function popup snippet contains:$/, async text => {
await celOvSteps.verifyTMQEFunctionPopupSnippet(text);
});
Then(/^the time machine query edit function popup is not visible$/, async () => {
await celOvSteps.verifyTMQEFunctionPopupNotVisible();
});
When(/^hover over the time machine query editor timerange dropdown button$/, async () => {
await celOvSteps.hoverOverTMQETimerangeDropdown();
});
When(/^hover over the time machine query editor submit button$/, async() => {
await celOvSteps.hoverOverTMCellEditSubmit();
});
When(/^send keys "(.*)" to the time machine flux editor$/, async keys => {
await celOvSteps.sendKeysToTimeMachineFluxEditor(keys);
});
Then(/^the time machine raw data table is not present$/, async () => {
await celOvSteps.verifyTMRawDataTableNotPresent();
});
Then(/^the time machine raw data table is present$/, async () => {
await celOvSteps.verifyTMRawDataTablePresent();
});
When(/^click time machine raw data toggle$/, async () => {
await celOvSteps.clickTMRawDataToggle();
});
Then(/^time machine raw data cell "(.*)" contains "(.*)"$/, async (coords, value) => {
let cartesCoords = JSON.parse(coords);
await celOvSteps.verifyTMRawDataCellContents(cartesCoords, value);
});
When(/^scroll time machine raw data "(.*)"$/, async (d_coords) => {
let cartesCoords = JSON.parse(d_coords);
await celOvSteps.scrollTMRawDataTable(cartesCoords);
});
When(/^click time machine download CSV$/, async () => {
await celOvSteps.clickTMDownloadCSV();
});
When(/^click the time machine script editor variables tab$/, async () => {
await celOvSteps.clickTMQEVariablesTab();
});
Then(/^the time machine variables list contains$/, async varList => {
await celOvSteps.verifyTMQEVariablesList(varList);
});
Then(/^the time machine variables list does not contain$/, {timeout: 10000}, async varList => {
await celOvSteps.verifyTMQWVarieblesListAbsent(varList);
});
When(/^enter the value "(.*)" in the time machine variables filter$/, async value => {
await celOvSteps.enterTMQEVariableFilterValue(value);
});
When(/^clear the time machine variables filter$/, async () => {
await celOvSteps.clearTMQEVariablesFilter();
});
When(/^hover over the time machine variable "(.*)"$/, async varname => {
await celOvSteps.hoverOverTMQEVariable(varname);
});
When(/^click the time machine variable "(.*)"$/, async varname => {
await celOvSteps.clickTMQEVariable(varname);
});
When(/^click inject the time machine variable "(.*)"$/, async varname => {
await celOvSteps.clickInjectTMQEVariable(varname);
});
Then(/^the time machine variable popover is not visible$/, async () => {
await celOvSteps.verifyTMQEVariablePopoverNotVisible();
});
Then(/^the time machine variable popover is visible$/, async () => {
await celOvSteps.verifyTMQEVariablePopoverVisible();
});
When(/^click time machine popover variable dropodown$/, async () => {
await celOvSteps.clickTMQEVariablePopoverVarDropdown();
});

View File

@ -1,339 +0,0 @@
import { Then, When, Given } from 'cucumber';
const dashboardSteps = require(__srcdir + '/steps/dashboards/dashboardSteps.js');
let dbdSteps = new dashboardSteps(__wdriver);
When(/^name dashboard "(.*)"$/, async name => {
await dbdSteps.nameDashboard(name);
});
Then(/^the dashboard named "(.*)" is loaded$/, {timeout: 10000}, async name => {
await dbdSteps.verifyDashboardLoaded(name);
});
Then(/^the new dashboard page is loaded$/, {timeout: 10000}, async () => {
await dbdSteps.verifyDashboardLoaded('Name this Dashboard');
});
Then(/^the dashboard contains a cell named "(.*)"$/, async name => {
await dbdSteps.verifyDashboardCellVisible(name);
});
Then(/^the empty dashboard contains a documentation link$/, async () => {
await dbdSteps.verifyDashboardEmptyDocLinkVisible();
await dbdSteps.verifyDashboardEmptyDocLink('https://v2.docs.influxdata.com/v2.0/visualize-data/variables/');
});
Then(/^the empty dashboard contains Add a Cell button$/, async () => {
await dbdSteps.verifyDashboardEmptyAddCell();
});
When(/^click dashboard time locale dropdown$/, async () => {
await dbdSteps.clickDashboardTimeLocaleDropdown();
});
Then(/^the active dashboard dropdown contains items:$/, async items => {
await dbdSteps.verifyDashboardDropdownContains(items);
});
When(/^click dashboard refresh dropdown$/, async () => {
await dbdSteps.clickDashboardRefreshDropdown();
});
Then(/^the active dashboard dropdown contains dividers:$/, async labels => {
await dbdSteps.verifyDashboardDropdownContainsDividers(labels);
});
When(/^click dashboard time range dropdown$/, async () => {
await dbdSteps.clickDashboardTimeRangeDropdown();
});
When(/^click the empty create cell button$/, async () => {
await dbdSteps.clickCreateCellEmpty();
});
When(/^click the header add cell button$/, async () => {
await dbdSteps.clickHeaderAddCellButton();
});
Then(/^there is no dashboard cell named "(.*)"$/, async name => {
await dbdSteps.verifyCellNotPresent(name);
});
Then(/^the cell named "(.*)" contains the empty graph message$/, async name => {
await dbdSteps.verifyEmptyGraphMessage(name);
});
Then(/^the cell named "(.*)" has no results$/, async name => {
await dbdSteps.verifyEmptyGraphNoResults(name);
});
Then(/^the cell named "(.*)" contains a graph error$/, async name => {
await dbdSteps.verifyCellContainsGraphError(name);
});
Then(/^the cell named "(.*)" contains a graph$/, async name => {
await dbdSteps.verifyCellContainsGraph(name);
});
When(/^get the current graph of the cell "(.*)"$/, async name => {
await dbdSteps.getCurrentGraphOfCell(name);
});
When(/^get metrics of cell named "(.*)"$/, async name => {
await dbdSteps.getCellMetrics(name);
});
When(/^toggle context menu of dashboard cell named "(.*)"$/, async name => {
await dbdSteps.toggleDashboardCellContextMenu(name);
});
When(/^toggle context menu of 2nd dashboard cell named "(.*)"$/, async name => {
await dbdSteps.toggle2ndDashboardCellContextMenu(name);
});
When(/^click cell content popover add note$/, async () => {
await dbdSteps.clickDashboardPopOverlayAddNote();
});
Then(/^click note popup cancel$/, async () => {
await dbdSteps.clickNotePopupCance();
})
When(/^click cell content popover edit note$/, async () => {
await dbdSteps.clickDashboardPopOverlayEditNote();
});
When(/^click cell content popover configure$/, async () => {
await dbdSteps.clickDashboardPopOverlayConfigure();
});
When(/^click cell content popover delete$/, async () => {
await dbdSteps.clickDashboardPopOverlayDelete();
});
When(/^click cell content popover delet confirm$/, async () => {
await dbdSteps.clickDashboardPopOverlayDeleteConfirm();
});
When(/^click cell edit content popover clone$/, async () => {
await dbdSteps.clickDashboardPopOverlayClone();
});
Then(/^the edit note popup is loaded$/, async () => {
await dbdSteps.verifyEditNotePopupLoaded();
});
When(/^enter the cell note popup CodeMirror text:$/, async text =>{
await dbdSteps.setCellNotePopupCodeMirrorText(text);
});
Then(/^the cell note popup Markdown preview panel contains$/, async text=> {
await dbdSteps.verifyCellNotPopupPreviewContains(text);
});
When(/^click the cell note popup save button$/, async () => {
await dbdSteps.clickCellNotePopupSave();
});
Then(/^the cell named "(.*)" has a note indicator$/, async name => {
await dbdSteps.verifyCellHasNoteIndicator(name);
});
When(/^click the note indicator of the "(.*)" cell$/, async name => {
await dbdSteps.clickCellNoteIndicator(name);
});
Then(/^the cell note popover contains:$/, async text => {
await dbdSteps.verifyContentsOfCellNote(text);
});
When(/^click the cell title "(.*)"$/, async name => {
await dbdSteps.clickCellTitle(name);
});
Then(/^the cell note popover is not loaded$/, async () => {
await dbdSteps.verifyCellNotePopoverNotPresent();
});
Then(/^the cell content popover has item edit note$/, async () => {
await dbdSteps.verifyCellContentPopoverItemEditNote();
});
Then(/^the cell content popover is not loaded$/, async () => {
await dbdSteps.verifyCellContentPopoverNotPresent();
});
Then(/^the cell note popup Code Mirror text contains:$/, async text => {
await dbdSteps.verifyCodeMirrorContainsText(text);
});
When(/^clear the cell note popup Code Mirror text$/, async () => {
await dbdSteps.clearCellNotePopupCodeMirror();
});
Then(/^the cell note popup markup preview panel has no text$/, async () => {
await dbdSteps.verifyCellNotePopupMarkupPreviewNoText();
});
When(/^move the cell named "(.*)" by "(.*)"$/, {timeout: 15000}, async (name, vector) => {
let deltaCoords = JSON.parse(vector);
await dbdSteps.moveDashboardCell(name, deltaCoords);
});
When(/^resize the cell name "(.*)" by "(.*)"$/, {timeout: 15000}, async (name, vector) => {
let deltaSize = JSON.parse(vector);
await dbdSteps.resizeDashboardCell(name, deltaSize);
});
Then(/^size of the cell named "(.*)" has changed by "(.*)"$/, async (name, change) => {
let deltaSize = JSON.parse(change);
await dbdSteps.verifyDashboardCellSizeChange(name, deltaSize);
});
Then(/^the size of the of the cell named "(.*)" is unchangd$/, async name => {
await dbdSteps.verifyDashboardCellSizeChange(name, {dw: 0, dh: 0});
});
Then(/^the location of the cell named "(.*)" is changed by "(.*)"$/, async (name, vector) => {
let deltaCoords = JSON.parse(vector);
await dbdSteps.verifyCellPositionChange(name, deltaCoords);
});
Then(/^the location of the cell named "(.*)" is unchanged$/, async name => {
await dbdSteps.verifyCellPositionChange(name, {dx: 0, dy: 0});
});
When(/^click the dashboard Time Range Dropdown$/, async () => {
await dbdSteps.clickDashboardTimeRangeDropdown();
});
Then(/^the dashboard Time Range Dropdown selected contains "(.*)"$/, async value => {
await dbdSteps.verifyDashboardTimeRangeDropdownSelected(value);
});
When(/^select dashboard Time Range "(.*)"$/, async item => {
await dbdSteps.selectDashboardTimeRange(item);
});
Then(/^the graph of the cell "(.*)" has changed$/, async name => {
await dbdSteps.verifyCellGraphChange(name);
});
Then(/^the graph of the cell "(.*)" has not changed$/, async name => {
await dbdSteps.verifyCellGraphNoChange(name);
});
Then(/^the graph of the cell "(.*)" is visible$/, async name => {
await dbdSteps.verifyCellGraphVisible(name);
});
Then(/^the graph of the cell "(.*)" differs from "(.*)"$/, async (name1, name2) => {
await dbdSteps.compareCellGraphs(name1, name2, false);
});
When(/^hover over the graph of the cell named "(.*)"$/, async name => {
await dbdSteps.hoverGraphOfCell(name);
});
Then(/^the cell graph data point infobox is visible$/, async () => {
await dbdSteps.verifyCellGraphDataPointInfoBox();
});
When(/^move horizontally to "(.*)" of graph cell named "(.*)"$/, async (fraction,name) => {
await dbdSteps.moveToHorizontalFractionOfGraphCell(fraction, name);
});
When(/^drag horizontally to "(.*)" of graph cell named "(.*)"$/, async (fraction, name) => {
await dbdSteps.dragToHorizontalFractionOfGraphCell(fraction, name);
});
When(/^move vertically to "(.*)" of graph cell named "(.*)"$/, async (fraction, name) => {
await dbdSteps.moveToVerticalFractionOfGraphCell(fraction, name);
});
When(/^drag vertically to "(.*)" of graph cell named "(.*)"$/, async (fraction, name) => {
await dbdSteps.dragToVerticalFractionOfGraphCell(fraction, name);
});
When(/^Click at the point "(.*)" of graph cell named "(.*)"$/, async (target, name) => {
let fracs = JSON.parse(target);
await dbdSteps.clickPointWithinCellByFractions(fracs, name);
});
Then(/^the cell named "(.*)" is visible in the dashboard$/, async name => {
await dbdSteps.verifyDashboardCellVisible(name);
});
Then(/^there is a second dashboard cell named "(.*)"$/, async name => {
await dbdSteps.verifyCountCellsNamed(name, 2);
});
Then(/^the cell named "(.*)" is no longer present$/, async name => {
await dbdSteps.verifyCellNotPresent(name);
});
When(/^hover over the error icon of the cell "(.*)"$/, async name => {
await dbdSteps.hoverOverCellErrorIcon(name);
});
Then(/^the empty cell error popover message is:$/, async msg => {
await dbdSteps.verifyEmptyCellErrorPopoverMessage(msg);
});
Then(/^the cell error message of the cell named "(.*)" is:$/, async (name, msg) => {
await dbdSteps.verifyCellErrorMessage(name, msg);
});
Then(/^the dashboard variables button is highlighted$/, async () => {
await dbdSteps.verifyVariablesButtonActive();
});
Then(/^the dashboard variables button is not highlighted$/, async () => {
await dbdSteps.verifyVariablesButtonInactive();
});
When(/^click the value dropdown button for variable "(.*)"$/, async varname => {
await dbdSteps.clickValueDropdownOfVar(varname);
});
Then(/^the value dropdown for variable "(.*)" contains$/, async (varname,items) =>{
await dbdSteps.verifyVariableDropdownContents(varname,items)
});
Then(/^the selected item of the dropdown for variable "(.*)" is "(.*)"$/, async (varname, item) => {
await dbdSteps.verifySlectedValueOfVariable(varname, item);
});
When(/^click the item "(.*)" for variable "(.*)"$/, async (item, varname) => {
await dbdSteps.clickItemOfVariableValueDropdown(item, varname);
});
Then(/^the value dropdown for variable "(.*)" is visible$/, async varname => {
await dbdSteps.verifyVariableValuesDropdownVisible(varname);
});
Then(/^the value dropdown for variable "(.*)" is not visible$/, async varname => {
await dbdSteps.verifyVariableValuesDropdownNotVisible(varname);
});
When(/^click the dashboard variables button$/, async() => {
await dbdSteps.clickVariablesButton();
});
When(/^click dashboard add note button$/, async () => {
await dbdSteps.clickDashboardMainAddNote();
});
Then(/^main "(.*)" note popup is loaded$/, async state => {
await dbdSteps.verifyMainEditNotePopupLoaded(state);
});
Then(/^the main note popup markdown preview panel contains a "(.*)" tag with "(.*)"$/, async (tag,content) => {
await dbdSteps.verifyNotePopupMarkdownPreviewContains(tag, content);
});
Then(/^the note cell contains a "(.*)" tag with "(.*)"$/, async (tag,content) => {
await dbdSteps.verifyNoteCellContains(tag,content);
});

View File

@ -1,288 +0,0 @@
import { Then, When } from 'cucumber';
const dashboardsSteps = require(__srcdir + '/steps/dashboards/dashboardsSteps.js');
let dbdsSteps = new dashboardsSteps(__wdriver);
Then(/^the Dashboards page is loaded$/, {timeout: 2 * 5000}, async() => {
await dbdsSteps.isLoaded();
await dbdsSteps.verifyIsLoaded();
await dbdsSteps.verifyHeaderContains('Dashboards');
});
When(/^click create dashboard control$/, async() => {
await dbdsSteps.clickCreateDashboard();
});
When(/^click "(.*)" in create dashboard dropdown$/, async item => {
await dbdsSteps.clickCreateDashboardItem(item);
});
When(/^click the empty Create dashboard dropdown button$/, async () => {
await dbdsSteps.clickCreateDashboardEmpty();
});
Then(/^the empty create dashboard dropdown list contains$/, async (items) => {
await dbdsSteps.verifyEmptyCreateDashboardItems(items);
});
When(/^click the create dashboard item "(.*)"$/, async (item) => {
await dbdsSteps.clickCreateDashboardItem(item);
});
Then(/^the empty Create dashboard dropdown button is not present$/, async () => {
await dbdsSteps.verifyEmptyCreateDashboardNotPresent();
});
Then(/^there is a dashboard card named "(.*)"$/, async name =>{
await dbdsSteps.verifyDashboardCardVisible(name);
});
Then(/^there is no dashboard card named "(.*)"$/, async name => {
await dbdsSteps.verifyDashboardCardNotPresent(name);
});
When(/^hover over dashboard card named "(.*)"$/, async name => {
await dbdsSteps.hoverOVerDashboardCard(name);
});
Then(/^the export button for the dashboard card "(.*)" is visible$/, async name => {
await dbdsSteps.verifyExportButtonOfCardVisible(name);
});
Then(/^the clone button for the dashboard card "(.*)" is visible$/, async name => {
await dbdsSteps.verifyCloneButtonOfCardVisible(name);
});
Then(/^the delete button for the dashboard card "(.*)" is visible$/, async name => {
await dbdsSteps.verifyDeleteButtonOfCardVisible(name);
});
When(/^hover over dashboard card name "(.*)"$/, async name => {
await dbdsSteps.hoverOverDashboardCardName(name);
});
When(/^click the edit dashboard card name button for "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardNameButton(name);
});
When(/^clear the name input of the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clearDashboardCardName(name);
});
When(/^enter the new name "(.*)" in the name input of the dashboard card "(.*)"$/, async (newName, oldName) => {
await dbdsSteps.renameDashboardCard(newName, oldName);
});
Then(/^the description for card "(.*)" contains "(.*)"$/, async (name, descr) => {
await dbdsSteps.verifyDashboardCardContainsDescription(name,descr);
});
When(/^hover over description of the dashboard card "(.*)"$/, async name => {
await dbdsSteps.hoverOverDashboardCardDescription(name);
});
When(/^click the edit description button for the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardEditDescriptionButton(name);
});
When(/^enter into the dashboard card "(.*)" the description:$/, async (name, descr) => {
await dbdsSteps.enterDashboardCardDescription(name,descr);
});
When(/^click empty label for the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickEmptyLabelOfDashboardCard(name);
});
When(/^click add label for the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickAddLabelOfDashboardCard(name);
});
Then(/^the label "(.*)" in the popover selector is visible$/, async label => {
await dbdsSteps.verifyLabelInDashboardsPopoverIsVisible(label);
});
When(/^enter "(.*)" in the popover label selector filter$/, async text => {
await dbdsSteps.enterDashboardLabelsFilter(text);
});
Then(/^there are "(.*)" label pills in the select label popover$/, async count => {
await dbdsSteps.verifyDashboardAddLabelsPillCount(count);
});
Then(/^the create new label item is not visible in the popover$/, async () => {
await dbdsSteps.verifyLabelPopoverCreateNewNotPresent();
});
Then(/^the create new label item is visible in the popover$/, async () => {
await dbdsSteps.verifyLabelPopoverCreateNewIsVisible();
});
When(/^click the new label item in the add labels popover$/, async () => {
await dbdsSteps.clickLabelPopoverCreateNewLabel();
});
Then(/^the dashboard card "(.*)" has the label "(.*)"$/, async (name, label) => {
await dbdsSteps.verifyDashboardCardHasLabel(name, label);
});
When(/^click the add label button for the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardAddLabel(name);
});
When(/^hover over the label "(.*)" of the dashboard card "(.*)"$/, async (label,name) => {
await dbdsSteps.hoverDashboardCardLabel(name, label);
});
When(/^click remove label "(.*)" from the dashboard card "(.*)"$/, async (label,name) => {
await dbdsSteps.clickDashboardCardRemoveLabel(name,label);
});
Then(/^the dashboard card "(.*)" labels empty message is visible$/, async name => {
await dbdsSteps.verifyDashboardCardLabelsEmptyVisible(name);
});
Then(/^the label "(.*)" of the dashboard card "(.*)" is not present$/, async (label,name) => {
await dbdsSteps.verifyDashboardCardLabelNotPresent(name, label);
});
Then(/^the label "(.*)" is not present in the popover selector$/, async label => {
await dbdsSteps.verifyLabelInDashboardsPopoverIsNotPresent(label);
});
Then(/^the dashboards page contains the cards:$/, async cards => {
await dbdsSteps.verifyDashboardCardsVisible(cards);
});
When(/^enter the term "(.*)" in the dashboards filter$/, async term => {
await dbdsSteps.enterDashboardsCardFilter(term);
});
When(/^clear the dashboards filter$/, async () => {
await dbdsSteps.clearDashboardsCardFilter();
});
Then(/^the dashboards page does not contain the cards:$/, {timeout: 15000}, async cards => {
await dbdsSteps.verifyDashboardCardsNotPresent(cards);
});
Then(/^the Import Dashboard popup is loaded$/, async () => {
await dbdsSteps.verifyImportDashboardPopupVisible();
});
Then(/^the Create Dashboard from Template popup is loaded$/, async () => {
await dbdsSteps.verifyCreateDashboardFromTemplatePopupVisible();
});
When(/^upload the import dashboard file "(.*)"$/, async path2file => {
await dbdsSteps.uploadImportDashboardPopupFile(path2file);
});
Then(/^the import dashboard drag and drop header contains success "(.*)"$/, async path2file => {
await dbdsSteps.verifyImportPopupUploadSuccess();
await dbdsSteps.verifyImportPopupUploadFilename(path2file);
});
When(/^click the Import Dashboard button$/, async () => {
await dbdsSteps.clickImportDashboardButton();
});
When(/^click the Import Dashboard popup radio button Paste Json$/, async () => {
await dbdsSteps.clickImportDashboardPasteJSON();
});
Then(/^the Import Dashboard file upload control is not present$/, async () => {
await dbdsSteps.verifyImportDashboardFileUploadNotPresent();
});
When(/^paste contents of file "(.*)" into the JSON textarea$/, {timeout: 90000}, async filepath => {
await dbdsSteps.pasteFileContentsImportDashboardTextarea(filepath);
});
When(/^click Dashboard from Template popup cancel button$/, async () => {
await dbdsSteps.clickFromTemplatePopupCancel();
});
When(/^click the template item "(.*)"$/, async item => {
await dbdsSteps.clickFromTemplatePopupTemplateItem(item, async () => {
await this.driver.sleep(1000); //slow to load?
});
});
Then(/^the template preview cell "(.*)" is visible$/, async name => {
await dbdsSteps.verifyFromTemplatePreviewCellVisible(name);
});
Then(/^the Dashboard from Template create button is disabled$/, async () => {
await dbdsSteps.verifyFromTemplatePopupCreateDisabled();
});
When(/^click Dashboard from Template create button$/, async () => {
await dbdsSteps.clickDashboardFromTemplateCreate();
});
Then(/^the dashboards are sorted as:$/, async dBoards => {
await dbdsSteps.verifyDashboardSortOrder(dBoards);
});
When(/^click dashboards sort type dropdown$/, async () => {
await dbdsSteps.clickSortDashboardsByType();
});
When(/^click dashboards sort by "(.*)"$/, async item => {
await dbdsSteps.clickSortDashboardsListItem(item);
});
When(/^click delete of dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardDelete(name);
});
When(/^click delete confirm of dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardDeleteConfirm(name);
});
When(/^click clone of the dashboard card named "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardClone(name);
});
When(/^click the clone confirm of dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardCloneConfirm(name);
});
When(/^click export of the dashboard card named "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardExport(name);
});
When(/^click confirm export of the dashboard card "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardExportConfirm(name);
});
Then(/^the Export Dashboard popup is loaded$/, async () => {
await dbdsSteps.verifyExportDashboardPopupLoaded();
});
When(/^click the Export Dashboard dismiss button$/, async () => {
await dbdsSteps.clickExportDashboardPopupDismiss();
});
When(/^click Export Dashboard popup Download JSON for "(.*)"$/, {timeout: 60000}, async filePath => {
await dbdsSteps.clickExportDashboardDownloadJSON(filePath);
});
When(/^click Export Dashboard popup Save as Template$/, async () => {
await dbdsSteps.clickExportDashboardSaveAsTemplate();
});
When(/^click Export Dashboard popup Copy to Clipboard$/, async () => {
await dbdsSteps.clickExportDashboardCopyToClipboard();
});
When(/^click the dashboard name "(.*)"$/, async name => {
await dbdsSteps.clickDashboardCardName(name);
});
When(/^click the dashboards filter input$/, async () => {
await dbdsSteps.clickDashboardsFilterInput();
});

View File

@ -1,204 +0,0 @@
import {Then, When} from 'cucumber';
const dataExplorerSteps = require(__srcdir + '/steps/dataExplorer/dataExplorerSteps.js');
let deSteps = new dataExplorerSteps(__wdriver);
Then(/^the Data Explorer page is loaded$/, {timeout: 2 * 5000}, async () => {
await deSteps.isLoaded();
await deSteps.verifyIsLoaded();
//await deSteps.verifyHeaderContains('Data Explorer');
});
When(/^choose bucket named "(.*)"$/, async (bucket) => {
await deSteps.chooseBucket(bucket);
});
When(/^choose the item "(.*)" in builder card "(.*)"$/, async (measurement,index) => {
await deSteps.chooseItemFromBuilderCard(measurement, index);
})
When(/^click the submit button$/, async () => {
await deSteps.clickQuerySubmitButton();
});
Then(/^the time machine graph is shown$/, async() => {
await deSteps.verifyGraphVisible();
});
When(/^hover over the graph$/, async() => {
await deSteps.hoverOverGraph();
});
Then(/^the graph data point infobox is visible$/, async () => {
await deSteps.verifyGraphDataPointInfoBox();
});
When(/^get the current graph$/, async() => {
await deSteps.getCurrentGraph();
});
When(/^move horizontally to "(.*)" of the graph$/, async (fraction) => {
await deSteps.moveToHorizontalFractionOfGraph(fraction);
});
When(/^drag horizontally to "(.*)" of the graph$/, async (fraction) => {
await deSteps.dragToHorizontalFractionOfGraph(fraction);
});
Then(/^the graph has changed$/, async() => {
await deSteps.verifyGraphChange();
});
When(/^Click at the point "(.*)" of the graph$/, async (target) => {
let fracs = JSON.parse(target);
await deSteps.clickPointWithinGraphByFractions(fracs);
});
When(/^move vertically to "(.*)" of the graph$/, async (fraction) => {
await deSteps.moveToVerticalFractionOfGraph(fraction);
});
When(/^drag vertically to "(.*)" of the graph$/, async (fraction) => {
await deSteps.dragToVerticalFractionOfGraph(fraction);
});
When(/^click the refresh button$/, async () => {
await deSteps.clickQuerySubmitButton();
});
When(/^click the automatic refresh - paused$/, async () => {
await deSteps.clickRefreshDropdownPaused();
});
When(/^click the automatic refresh - active$/, async () => {
await deSteps.clickRefreshDropdownActive();
});
When(/^select the automatic refresh "(.*)"$/, async (item) => {
await deSteps.selectRefreshDropdownItem(item);
});
When(/^click the time machine add query button$/, async () => {
await deSteps.clickAddQueryButton();
});
When(/^right click on the time machine query tab named "(.*)"$/, async (title) => {
await deSteps.rightClickQueryTabTitle(title);
});
When(/^click on the time machine query tab named "(.*)"$/, async (title) => {
await deSteps.clickQueryTabTitle(title);
});
When(/^click on "(.*)" in the query tab menu$/, async (item) => {
await deSteps.selectQueryTabMenuItem(item);
});
When(/^input a new query tab name as "(.*)"$/, async (name) => {
await deSteps.setQueryTabName(name);
});
When(/^click the Script Editor button$/, async () => {
await deSteps.clickScriptEditorButton();
});
When(/^paste into Script Editor text area$/, { timeout: 20000 }, async text => {
await deSteps.pasteIntoScriptEditor(text);
});
When(/^click the graph view type dropdown$/, async () => {
await deSteps.clickViewTypeDropdown();
});
When(/^select the graph view type "(.*)"$/, async (type) => {
await deSteps.selectViewType(type);
});
Then(/^the graph view type is Graph plus Single Stat$/, async () => {
await deSteps.verifySingleStatTextVisible();
});
When(/^click the view raw data toggle$/, async () => {
await deSteps.clickViewRawDataToggle();
});
Then(/^the raw data table is visible$/, async () => {
await deSteps.verifyRawDataTableVisible();
});
When(/^click the graph time range dropdown$/, async () => {
await deSteps.clickTimeRangeDropdown();
});
When(/^select the graph time range "(.*)"$/, async (item) => {
await deSteps.selectTimeRangeDropdownItem(item);
});
When(/^search for function "(.*)"$/, async (funct) => {
await deSteps.searchFunction(funct);
});
When(/^select the function "(.*)"$/, async (funct) => {
await deSteps.selectFunctionFromList(funct);
});
When(/^click on the Save as button$/, async () => {
await deSteps.clickSaveAsButton();
});
Then(/^the Save as overlay is visible$/, async () => {
await deSteps.verifySaveAsOverlayVisible();
});
When(/^click the Target Dashboard dropdown$/, async () => {
await deSteps.clickTargetDashboardDropdown();
});
When(/^select Create a New Dashboard from the Target Dashboard dropdown$/, async () => {
await deSteps.selectTargetDashboardDropdownItem();
});
When(/^input the New Dashboard Name "(.*)"$/, async (name) => {
await deSteps.setNewDashboardName(name);
});
When(/^input the Cell Name "(.*)"$/, async (name) => {
await deSteps.setCellName(name);
});
When(/^click on the Save as Dashboard Cell button$/, async () => {
await deSteps.clickSaveAsDashboardCellButton();
});
When(/^click on tab "(.*?)" in the Save As popup$/, async(tab) => {
await deSteps.clickSaveAsPopupTab(tab);
});
When(/^input the Task Name "(.*)"$/, async (name) => {
await deSteps.setTaskName(name);
});
When(/^input the Task Interval "(.*)"$/, async (interval) => {
await deSteps.setTaskInterval(interval);
});
When(/^input the Task Offset "(.*)"$/, async (offset) => {
await deSteps.setTaskOffset(offset);
});
When(/^click on the Save as Task button$/, async () => {
await deSteps.clickSaveAsTaskButton();
});
When(/^input the variable name "(.*)"$/, async (name) => {
await deSteps.setVariableName(name);
});
When(/^click on the Save as Variable button$/, async () => {
await deSteps.clickSaveAsVariableButton();
});

View File

@ -1,35 +0,0 @@
import { Then, When } from 'cucumber';
const homeSteps = require(__srcdir + '/steps/home/homeSteps.js');
let hSteps = new homeSteps(__wdriver);
Then(/^the home page is loaded$/, {timeout: 2 * 5000}, async () => {
await hSteps.isLoaded();
await hSteps.verifyIsLoaded();
});
When(/^click logout from the home page$/, async() => {
await hSteps.clickLogout();
});
When(/^I click the panel "(.*)"$/, async title => {
await hSteps.clickQuickStartPanel(title);
});
Then(/^the dashboards panel contains a link to "(.*)"$/, async dbdName => {
await hSteps.verifyDbdPanelDashboard(dbdName);
});
When(/^click the dashboard link to "(.*)"$/, async dbdName => {
await hSteps.clickDbdPanelDashboard(dbdName);
});
Then(/^the dashboards panel contains links:$/, async links => {
await hSteps.verifyDashboardLinksInPanel(links);
});
When(/^click the dashboards panel link "(.*)"$/, async link => {
await hSteps.clickDashboardLinkFromPanel(link);
});

View File

@ -1,62 +0,0 @@
import { Then, When } from 'cucumber';
const influxSteps = require(__srcdir + '/steps/influx/influxSteps.js');
const createOrgSteps = require(__srcdir + '/steps/createOrgSteps.js');
let iSteps = new influxSteps(__wdriver);
let cOrgSteps = new createOrgSteps(__wdriver);
Then(/^influx page is loaded$/, async() => {
await iSteps.verifyIsLoaded();
});
Then(/^the header contains the org name "(.*?)"$/, async (orgname) => {
await iSteps.verifyHeaderContains((orgname === 'DEFAULT') ? __defaultUser.org : orgname);
});
Then(/^the home page header contains "(.*)"$/, async content => {
await iSteps.verifyHeaderContains(content);
});
Then(/^the Create Organization form is loaded$/, {timeout: 2 * 5000}, async () => {
await cOrgSteps.isLoaded();
await cOrgSteps.verifyIsLoaded();
});
When(/^hover over the "(.*?)" menu item$/, async (item) => {
await iSteps.hoverNavMenu(item);
});
Then(/^the home submenu items are "(.*?)"$/, async(state) => {
await iSteps.verifySubMenuItems('home:heading', state);
await iSteps.verifySubMenuItems('home:neworg', state);
await iSteps.verifySubMenuItems('home:logout', state);
});
When(/^click nav sub menu "(.*?)"$/, async(item) => {
await iSteps.clickSubMenuItem(item);
});
When(/^click user nav item "(.*)"$/, async (item) => {
await iSteps.clickUserMenuItem(item);
});
When(/^click nav menu item "(.*?)"$/, async(item) => {
await iSteps.clickMenuItem(item);
});
Then(/^the menu item text "(.*?)" is "(.*?)"$/, async (text, state) => {
await iSteps.verifyVisibilityNavItemByText(text, state.toLowerCase() !== 'hidden');
});
Then(/^the feedback URL should include "(.*?)"$/, async text => {
await iSteps.verifyFeedbackLinkContains(text);
});
Then(/^the user menu items are "(.*?)"$/, async(state) => {
await iSteps.verifyUserMenuItems('switchOrg', state);
await iSteps.verifyUserMenuItems('createOrg', state);
await iSteps.verifyUserMenuItems('logout', state);
});

View File

@ -1,316 +0,0 @@
import { Given, Then, When } from 'cucumber';
const bucketsSteps = require(__srcdir + '/steps/loadData/bucketsSteps.js');
const influxUtils = require(__srcdir + '/utils/influxUtils.js');
let bktTabSteps = new bucketsSteps(__wdriver);
Then(/^the buckets are sorted as "(.*)"$/, async (bucketNames) => {
await bktTabSteps.verifyOrderByName(bucketNames);
});
Then(/^the bucket "(.*)" is not in the list$/, async (name) => {
await bktTabSteps.verifyBucketNotListedByName(name);
});
When(/^click the Create Bucket button$/, async () => {
await bktTabSteps.clickCreateBucket();
});
Then(/^the Create Bucket Popup is loaded$/, async () => {
await bktTabSteps.verifyCreateBucketPopup();
});
Then(/^the Create button of Create Bucket Popup is disabled$/, async () => {
await bktTabSteps.verifyCreateBucketCreateButtonEnabled(false);
});
Then(/^the Create button of Create Bucket Popup is enabled$/, async () => {
await bktTabSteps.verifyCreateBucketCreateButtonEnabled(true);
});
Then(/^the Retention Policy radio button "(.*)" is active$/, async (rp) => {
await bktTabSteps.verifyActiveRetentionPolicyButton(rp);
});
Then(/^the Retention Policy radio button "(.*)" is inactive$/, async (rp) => {
await bktTabSteps.verifyInactiveRetentionPolicyButton(rp);
});
//Waiting for dismissal can take a few secs
When(/^dismiss the Create Bucket Popup$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.dismissBucketPopup();
});
When(/^dismiss the Edit Bucket Popup$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.dismissBucketPopup();
});
// Should be not present - removed from DOM
Then(/^the Create Bucket Popup is not present$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.verifyCreateBucketPopupNotPresent();
});
Then(/^the Edit Bucket Popup is not present$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.verifyCreateBucketPopupNotPresent();
});
//Waiting for dismissal can take a few secs
When(/^cancel the Create Bucket Popup$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.cancelBucketPopup();
});
When(/^cancel the Edit Bucket Popup$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.cancelBucketPopup();
});
Then(/^the Retention Policy intervals controls are not present$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.verifyRPIntervalControlsNotPresent();
});
Then(/^the Retention Policy intervals controls are present$/, async () => {
await bktTabSteps.verifyRPIntervalControlsPresent();
});
When(/^click the Retention Policy "(.*)" button$/, async(rp) => {
await bktTabSteps.clickRetentionPolicyButton(rp);
});
When(/^input the name of the bucket as "(.*)"$/, async (name) => {
await bktTabSteps.setBucketName(name);
});
When(/^clear all Retention Policy interval controls$/, async () => {
await bktTabSteps.clearAllRetentionPolicyIntervals();
});
When(/^enter "(.*)" into the Retention Policy "(.*)" control$/, async(amount, unit) => {
await bktTabSteps.enterIntervalValue(amount, unit);
});
Then(/^the Retention Policy "(.*)" control contains the value "(.*)"$/, async(unit, value) => {
await bktTabSteps.verifyIntervalValue(value, unit);
});
When(/^set the retention policy of the bucket as "(.*)"$/, async (rp) => {
if(rp.toLowerCase() === 'never'){
await bktTabSteps.clickRetentionPolicyButton('never');
}else{
//rp = rp.trim();
//let policy = rp.split(" ");
await bktTabSteps.clickRetentionPolicyButton('intervals');
await bktTabSteps.clickPopupRPDurationSelectorButton();
await bktTabSteps.clickRPSelectorValue(rp);
//await bktTabSteps.enterIntervalValue(policy[0], policy[1]);
}
});
When(/^click the Create Bucket popup Create button$/, async () => {
await bktTabSteps.clickCreatePopupCreate();
});
Then(/^the Retention Policy warning message contains "(.*)"$/, async (msg) => {
await bktTabSteps.verifyFormErrorMessageContains(msg);
});
Then(/^the Retention Policy warning message has disappeared$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.verifyFormErrorMessageNotPresent();
});
Then(/^the bucket named "(.*)" is in the list$/, async (name) => {
await bktTabSteps.verifyBucketInListByName(name);
});
Then(/^the bucket card named "(.*)" is not in the list$/, async (name) => {
await bktTabSteps.verifyBucktNotInListByName(name);
});
Then(/^the bucket named "(.*)" has a Retention Policy of "(.*)"$/, async (name, rp) => {
await bktTabSteps.verifyBucketHasRetentionPolicy(name, rp);
});
When(/^click on the bucket named "(.*)"$/, async (name) => {
await bktTabSteps.clickOnBucketNamed(name);
});
When(/^click on settings for bucket named "(.*)"$/, async (name) => {
await bktTabSteps.clickOnBucketSettings(name);
});
Then(/^the Edit Bucket popup is loaded$/, async () => {
await bktTabSteps.verifyEditBucketPopup();
});
Then(/^the name edit textbox of the Edit Bucket popup is disabled$/, async() => {
await bktTabSteps.verifyNameInputEnabled(false);
});
Then(/^the form help text contains "(.*)"$/, async (text) => {
await bktTabSteps.verifyPopupHelpText(text);
});
When(/^click Edit Bucket Popup Save Changes$/, async () => {
await bktTabSteps.clickSaveChanges();
});
When(/^enter "(.*)" in the Buckets filter field$/, {timeout: 10000}, async (text) => {
await bktTabSteps.setFilterValue(text);
});
When(/^clear the Buckets filter field$/, async () => {
await bktTabSteps.clearFilterValue();
});
Given(/^ensure buckets name sort order "(.*)"$/,{timeout: 2 * 5000}, async (order) => {
await bktTabSteps.ensureNameSortOrder(order);
});
When(/^click buckets sort by retention policy$/, async () => {
await bktTabSteps.clickRetentionSort();
});
When(/^click the buckets page title$/, async () => {
await bktTabSteps.clickPageTitle();
});
//need to move focus from list sometimes
When(/^click buckets filter$/, async () => {
await bktTabSteps.clickBucketsFilter();
});
When(/^hover over bucket card named "(.*)"$/,{timeout: 2 * 5000}, async (name) => {
await bktTabSteps.hoverOverCardNamed((name === 'DEFAULT') ? __defaultUser.bucket : name);
await bktTabSteps.driver.sleep(5000);
});
Then(/^the delete button of the card named "(.*)" is not present$/, {timeout: 2 * 5000}, async (name) => {
await bktTabSteps.verifyBucketCardDeleteNotPresent(name);
});
When(/^click the delete button of the card named "(.*)"$/, {timeout: 10000}, async (name) => {
await bktTabSteps.clickBucketCardDelete(name);
});
When(/^click the confirm delete button of the card named "(.*)"$/, async (name) => {
await bktTabSteps.clickBucketCardDeleteConfirm(name);
});
When(/^click add data button for bucket "(.*)"$/, async (name) => {
await bktTabSteps.clickAddDataButtonOfCard((name === 'DEFAULT') ? __defaultUser.bucket : name);
});
Then(/^the add data popover for the bucket "(.*)" is not visible$/, async (name) => {
await bktTabSteps.verifyBucketCardPopoverVisible((name === 'DEFAULT') ? __defaultUser.bucket : name, false);
});
Then(/^the add data popover is not present$/, async () => {
await bktTabSteps.verifyBucketCardPopover(false);
});
Then(/^the add data popover for the bucket "(.*)" is visible$/, async (name) => {
await bktTabSteps.verifyBucketCardPopoverVisible((name === 'DEFAULT') ? __defaultUser.bucket : name, true);
});
When(/^click the popover item "(.*)" for the bucket "(.*)"$/, async (item, name) => {
await bktTabSteps.clickPopoverItemForBucketCard((name === 'DEFAULT') ? __defaultUser.bucket : name, item);
});
When(/^click bucket card popover item "(.*)"$/, async item => {
await bktTabSteps.clickPopoverItem(item);
});
Then(/^the first page of the Line Protocol Wizard is loaded$/, async () => {
await bktTabSteps.verifyLineProtocolWizardVisible(true);
});
When(/^click radio button "(.*)"$/, async (name) => {
await bktTabSteps.clickRadioButton(name);
});
Then(/^the data point text area is visible$/, async () => {
await bktTabSteps.verifyDataPointsTextAreaVisible(true);
});
When(/^enter "(.*)" datapoints with value named "(.*)" starting at "(.*)" with "(.*)" data of type "(.*)" and prec "(.*)"$/,
async (count, value, start, mode, type, prec) => {
await bktTabSteps.enterLineProtocolDataPoints(count, value, start, mode, type, prec);
await bktTabSteps.driver.sleep(3000);
});
When(/^enter "(.*)" into the line protocol text area$/, async data => {
await bktTabSteps.enterLineProtocolRawData(data);
});
When(/^click the Line Protocol wizard precision dropdown$/, async () => {
await bktTabSteps.clickLineProtocolPrecisionDropdown();
});
When(/^click the Line Protocol wizard continue button$/, async () => {
await bktTabSteps.clickLineProtocolContinue();
});
When(/^click the Line Protocol wizard write button$/, async () => {
await bktTabSteps.clickLineProtocolWrite();
});
When(/^click the line Protocol wizard precision "(.*)"$/, async (prec) => {
await bktTabSteps.clickLineProtocolPrecisionItem(prec);
});
Then(/^the line Protocol wizard second step opens$/, async() => {
await bktTabSteps.verifyLineProtocolWizardSecondStep();
});
Then(/^the Line Protocol wizard step status message is "(.*)"$/, async msg => {
await bktTabSteps.verifyWizardStepStatusMessage(msg);
});
Then(/^the Line Protocol wizard step status message contains "(.*)"$/, async msg => {
await bktTabSteps.verifyWizardStepStatusMessageContains(msg);
});
When(/^click the Line Protocol wizard finish button$/, async () => {
await bktTabSteps.clickLineProtocolFinish();
});
When(/^click the Line Protocol wizard close button$/, async () => {
await bktTabSteps.clickLineProtocolClose();
});
When(/^click the Line Protocol wizard cancel button$/, async () => {
await bktTabSteps.clickLineProtocolCancel();
});
When(/^click the Line Protocol wizard close icon$/, async () => {
await bktTabSteps.clickLineProtocolCancelIcon();
});
Then(/^the line Protocol wizard is not present$/, {timeout: 2 * 5000}, async () => {
await bktTabSteps.verifyLineProtocolWizardVisible(false);
});
Then(/^the bucket "(.*)" for user "(.*)" contains "(.*)" datapoints of "(.*)" data with value named "(.*)" starting at "(.*)"$/,
async (bucket, user, count, mode, value, start) => {
await bktTabSteps.verifyBucketContains((bucket === 'DEFAULT') ? __defaultUser.bucket : bucket,
(user === 'DEFAULT')? __defaultUser: await influxUtils.getUser(user),
count, mode, value, start);
});
Then(/^the bucket "(.*)" for user "(.*)" contains:$/, async (bucket, userName, def) => {
await bktTabSteps.verifyBucketContainsByDef(bucket,userName, def);
});
When(/^add the file "(.*)" to the Line Protocol Wizard file upload$/, async filePath => {
await bktTabSteps.setFileUpload(filePath);
});
When(/^click the bucket data wizard previous button$/, async () => {
await bktTabSteps.clickDataWizardPreviousButton();
});

View File

@ -1,45 +0,0 @@
import { Then, When } from 'cucumber';
const clientLibsSteps = require(__srcdir + '/steps/loadData/clientLibsSteps.js');
let clibTabSteps = new clientLibsSteps(__wdriver);
Then(/^the Client Libraries tab is loaded$/, async () => {
await clibTabSteps.verifyClientLibsTabIsLoaded();
});
When(/^click the "(.*)" client library tile$/, async name => {
await clibTabSteps.clickLibTileByName(name);
});
Then(/^the csharp info popup is loaded$/, async () => {
await clibTabSteps.verifyCSharpPopupLoaded();
});
Then(/^the go info popup is loaded$/, async () => {
await clibTabSteps.verifyGoPopupLoaded();
});
Then(/^the java info popup is loaded$/, async () => {
await clibTabSteps.verifyJavaPopupLoaded();
});
Then(/^the node info popup is loaded$/, async () => {
await clibTabSteps.verifyNodePopupLoaded();
});
Then(/^the python info popup is loaded$/, async () => {
await clibTabSteps.verifyPythonPopupLoaded();
});
Then(/^click copy "(.*)" to clipboard$/, {timeout: 10000}, async label => {
await clibTabSteps.clickCopyToClipboardText(label);
});
Then(/^verify clipboard contains text of "(.*)"$/, async label => {
await clibTabSteps.verifyClipboardTextFrom(label);
});
Then(/^verify the github repository link contains "(.*)"$/, async token => {
await clibTabSteps.verifyPopupGithubLink(token);
});

View File

@ -1,108 +0,0 @@
import { Then, When } from 'cucumber';
const bucketsSteps = require(__srcdir + '/steps/loadData/bucketsSteps.js');
const telegrafsSteps = require(__srcdir + '/steps/loadData/telegrafsSteps.js');
const scrapersSteps = require(__srcdir + '/steps/loadData/scrapersSteps.js');
const loadDataSteps = require(__srcdir + '/steps/loadData/loadDataSteps.js');
let bktTabSteps = new bucketsSteps(__wdriver);
let teleTabSteps = new telegrafsSteps(__wdriver);
let scrTabSteps = new scrapersSteps(__wdriver);
let ldSteps = new loadDataSteps(__wdriver);
Then(/^the buckets tab is loaded$/, {timeout: 2 * 5000}, async() => {
await bktTabSteps.isLoaded();
});
Then(/^the Telegraf Tab is loaded$/, {timeout: 2 * 5000}, async() => {
await teleTabSteps.isLoaded();
});
Then(/^the Scrapers Tab is loaded$/, {timeout: 2 * 5000}, async() => {
await scrTabSteps.isLoaded();
});
Then(/^the Create Scraper popup is loaded$/, async() => {
await ldSteps.createScraperPopupLoaded();
});
When(/^dismiss the Create Scraper popup$/, async () => {
await ldSteps.dismissCreateScraperPopup();
});
Then(/^the Create Scraper popup is no longer present$/, {timeout: 2 * 5000}, async () => {
await ldSteps.verifyCreateScraperPopupNotPresent();
});
When(/^cancel the Create Scraper popup$/, async () => {
await ldSteps.cancelCreateScraperPopup();
});
When(/^clear the Scraper Popup name input$/, async () => {
await ldSteps.clearCreateScraperNameInput();
});
When(/^clear Scraper Popup the Target Url input$/, async () => {
await ldSteps.clearCreateScraperUrlInput();
});
Then(/^the Create Scrapper popup create button is disabled$/, async () => {
await ldSteps.verifyCreateScraperSubmitEnabled(false);
});
Then(/^the Create Scrapper popup create button is enabled$/, async () => {
await ldSteps.verifyCreateScraperSubmitEnabled(true);
});
When(/^enter the name "(.*)" into the Create Scraper popup name input$/, async name => {
await ldSteps.enterCreateScraperName(name);
});
When(/^enter the value "(.*)" into the Create Scraper popup url input$/, async url => {
await ldSteps.enterCreateScraperTargetURL(url);
});
When(/^click the Create Scrapper buckets dropdown$/, async () => {
await ldSteps.clickCreateScraperBucketsDropdown();
});
When(/^select the Scrapper buckets dropdown item "(.*)"$/, async (item) => {
await ldSteps.selectCreateScraperBucketsItem((item === 'DEFAULT') ? __defaultUser.bucket : item);
});
Then(/^an item for the bucket "(.*)" is an item in the buckets dropdown$/, async item => {
await ldSteps.verifyCreateScraperBucketsDropdownItem((item === 'DEFAULT') ? __defaultUser.bucket : item);
});
Then(/^NO items in the buckets dropdown are shown$/, async () => {
await ldSteps.verifyNoBucketItemsInBucketsDropdownShown();
});
When(/^click the create scraper create button$/, async () => {
await ldSteps.clickCreateScraperBucketCreateButton();
});
When(/^click load data tab "(.*)"$/, async (tab) => {
await ldSteps.clickTab(tab);
});
Then(/^the Create Telegraf Config Wizard is loaded$/, async () => {
await ldSteps.verifyCreateTelegrafWizardLoaded();
});
When(/^click the buckets dropdown button$/, async () => {
await ldSteps.clickBucketsDropdown();
});
When(/^select the buckets dropdown item "(.*)"$/, async item => {
await ldSteps.selectBucketsDropdownItem((item === 'DEFAULT') ? __defaultUser.bucket : item);
});
When(/^select the telegraf plugin tile "(.*)"$/, async tile => {
await ldSteps.selectTelegrafWizardPluginTile(tile);
});
When(/^enter the telegraf name "(.*)"$/, async name => {
await ldSteps.enterTelegrafWizardName(name);
});

Some files were not shown because too many files have changed in this diff Show More