influxdb/e2e/features/settings/templates.feature

169 lines
6.1 KiB
Gherkin
Raw Normal View History

2020-05-13 20:49:31 +00:00
@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>"
chore(e2e): update selectors and add containerization (#19221) * update: patch in tests from bonitoo-io/selenium-accept-infl2 * fix: add dataExplorer.feature - forgotten yesterday * update: refactor e2e test configuration * update: set actual cloud credentials in config * fix: issue with headless switch in config * update: WIP cloud experim and refactoring to use client libs * update: sync variablesTab with upstream changes * fix: clumsy use of resultObserver without promise * fix: troubleshoot merge issue * wip: Refactor using client APIs. * wip: refactoring tests with new client API * update: tokens tests * wip: fixing variables tests * fix: selectors for settings variables tests * update: update selectors for dashboards and cellEdit * e2e(fix): update selectors for generic popup * e2e(fix): fix note cell test * e2e(circleci): try and force nightly build * e2e(circleci): try and force nightly build bis * e2e(circleci): troubleshoot build issues * e2e(circleci): fix type * e2e(circleci): check circleci build * e2e(circleci): troubleshoot build failure * e2e(circleci): troubleshout circleci build * e2e(circleci): troubleshoot circleci build issues * e2e(circleci): troubleshoot build schedule * e2e(update): wip updating alerts selectors * e2e(circleci): troubleshoot reporting from tests * e2e(update): fix alert selectors - WIP * e2e(circleci): troubleshoot reporting issues in circleci * e2e(update): monitoring selector fixes * e2e(circleci): troubleshoot reporting issues * e2e(update): fix monitoring selectors * e2e(circleci): change cron trigger schedule for bonitoo * e2e(config): add ENV to declare username * test: add semantic commit * e2e: remove debug lines from old config.yml * fix(temp): remove bonitoo workflow from config.yml * fix(e2e): reset cron for hourly-e2e to original values * dataExplorer.feature new scenarios * fix(e2e): generalize urls in telegraf asserts * fix(e2e): troubleshoot circleci build * fix: update .circleci/config.yml nightly acceptance test and sync with upstream * fix(e2e): troubleshoot network issues on jenkins * fix(e2): troubleshoot jenkins failures * fix(e2e): troubleshoot jenkins issues * fix(e2e): troubleshoot jenkins failures * fix(e2e): troubleshoot test issues - change page load strategy * fix(e2e): troubleshoot build issues * fix(e2e): troubleshoot build issues * fix(e2e): add paranoia checks on using UI signin * fix(e2e): troubleshoot test issues * fix(e2e): change handling of env params * fix(e2e): troubleshoot signin stale elem issue * fix(e2e): typo * fix(e2e): synch selectors with recent UI changes * fix(e2e): update check for stale element on signin * fix(e2e): fine tune retry on stale element signin * fix(e2e): lengthen signin retry * fix(e2): try second stale element workaround * fix(e2): attempt to workaround stale element * fix(e2): try cruder solution to stale element on sign in * fix(e2): lengthen timeout for signing page load * fix(e2e): clear notifications before save in dataexplorer * fixes(e2e): update variables button selector * fix(e2e): cleanup data explorer test variable - from browser * fixes(e2e): stash experim changes to cucumber.js * fixes(e2e): troubleshoot deadman check failure * fix(e2e): stash cucumber.js * fix(e2e): update selectors for telegraf delete * fixes(e2e): extend timeout for input to monaco * fixes(e2e): troubleshoot timeout issue on paste into monaco * fixes(e2e): safety commit containerize * fixes(e2e): generic page header no longer applies - temp fix * fixes(e2e): changes to headers temp fixes * chore(e2e): stash acceptance test containerize work * chore(e2e): clean debug messages * feat(e2e): commandline args in containerized test script * fixes(e2e): add junit report generation to container script * fixes(e2e): set delay for selenoid startup * fixes(e2e): stop docker containers after tests * fix(e2e): drop bonitoo argv args before cucumber calls ArgvParser * chore(e2e): update README and remove experim naming * fix(e2e): troubleshoot occasional flake in notification assertions * feat(e2e): add simple performance utility for cloud * feat(e2e): tweek performance util * feat(e2e): start cloud testing with containerized tests * fix(e2e): halt script on unset required params * fix(e2e): remove messages that could leak info * fix(e2e): troubleshoot jenkins credentials * fix(e2e): troubleshoot parameter issues in jenkins * fix(e2e): cleanup troubleshoot code * fix(e2e): update create variables popup selector * fix(e2e): update submit button for template popup * fix(e2e): update selectors for data tokens tests * fix(e2e): sync alerts tests with recent changes * chore(e2e): add cloud specific Dockerfile * chore(e2e): add reporting to cloud dockerfile Co-authored-by: Cubone21 <kyuboun@gmail.com>
2020-08-05 15:22:09 +00:00
When click import template popup submit button
2020-05-13 20:49:31 +00:00
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
chore(e2e): update selectors and add containerization (#19221) * update: patch in tests from bonitoo-io/selenium-accept-infl2 * fix: add dataExplorer.feature - forgotten yesterday * update: refactor e2e test configuration * update: set actual cloud credentials in config * fix: issue with headless switch in config * update: WIP cloud experim and refactoring to use client libs * update: sync variablesTab with upstream changes * fix: clumsy use of resultObserver without promise * fix: troubleshoot merge issue * wip: Refactor using client APIs. * wip: refactoring tests with new client API * update: tokens tests * wip: fixing variables tests * fix: selectors for settings variables tests * update: update selectors for dashboards and cellEdit * e2e(fix): update selectors for generic popup * e2e(fix): fix note cell test * e2e(circleci): try and force nightly build * e2e(circleci): try and force nightly build bis * e2e(circleci): troubleshoot build issues * e2e(circleci): fix type * e2e(circleci): check circleci build * e2e(circleci): troubleshoot build failure * e2e(circleci): troubleshout circleci build * e2e(circleci): troubleshoot circleci build issues * e2e(circleci): troubleshoot build schedule * e2e(update): wip updating alerts selectors * e2e(circleci): troubleshoot reporting from tests * e2e(update): fix alert selectors - WIP * e2e(circleci): troubleshoot reporting issues in circleci * e2e(update): monitoring selector fixes * e2e(circleci): troubleshoot reporting issues * e2e(update): fix monitoring selectors * e2e(circleci): change cron trigger schedule for bonitoo * e2e(config): add ENV to declare username * test: add semantic commit * e2e: remove debug lines from old config.yml * fix(temp): remove bonitoo workflow from config.yml * fix(e2e): reset cron for hourly-e2e to original values * dataExplorer.feature new scenarios * fix(e2e): generalize urls in telegraf asserts * fix(e2e): troubleshoot circleci build * fix: update .circleci/config.yml nightly acceptance test and sync with upstream * fix(e2e): troubleshoot network issues on jenkins * fix(e2): troubleshoot jenkins failures * fix(e2e): troubleshoot jenkins issues * fix(e2e): troubleshoot jenkins failures * fix(e2e): troubleshoot test issues - change page load strategy * fix(e2e): troubleshoot build issues * fix(e2e): troubleshoot build issues * fix(e2e): add paranoia checks on using UI signin * fix(e2e): troubleshoot test issues * fix(e2e): change handling of env params * fix(e2e): troubleshoot signin stale elem issue * fix(e2e): typo * fix(e2e): synch selectors with recent UI changes * fix(e2e): update check for stale element on signin * fix(e2e): fine tune retry on stale element signin * fix(e2e): lengthen signin retry * fix(e2): try second stale element workaround * fix(e2): attempt to workaround stale element * fix(e2): try cruder solution to stale element on sign in * fix(e2): lengthen timeout for signing page load * fix(e2e): clear notifications before save in dataexplorer * fixes(e2e): update variables button selector * fix(e2e): cleanup data explorer test variable - from browser * fixes(e2e): stash experim changes to cucumber.js * fixes(e2e): troubleshoot deadman check failure * fix(e2e): stash cucumber.js * fix(e2e): update selectors for telegraf delete * fixes(e2e): extend timeout for input to monaco * fixes(e2e): troubleshoot timeout issue on paste into monaco * fixes(e2e): safety commit containerize * fixes(e2e): generic page header no longer applies - temp fix * fixes(e2e): changes to headers temp fixes * chore(e2e): stash acceptance test containerize work * chore(e2e): clean debug messages * feat(e2e): commandline args in containerized test script * fixes(e2e): add junit report generation to container script * fixes(e2e): set delay for selenoid startup * fixes(e2e): stop docker containers after tests * fix(e2e): drop bonitoo argv args before cucumber calls ArgvParser * chore(e2e): update README and remove experim naming * fix(e2e): troubleshoot occasional flake in notification assertions * feat(e2e): add simple performance utility for cloud * feat(e2e): tweek performance util * feat(e2e): start cloud testing with containerized tests * fix(e2e): halt script on unset required params * fix(e2e): remove messages that could leak info * fix(e2e): troubleshoot jenkins credentials * fix(e2e): troubleshoot parameter issues in jenkins * fix(e2e): cleanup troubleshoot code * fix(e2e): update create variables popup selector * fix(e2e): update submit button for template popup * fix(e2e): update selectors for data tokens tests * fix(e2e): sync alerts tests with recent changes * chore(e2e): add cloud specific Dockerfile * chore(e2e): add reporting to cloud dockerfile Co-authored-by: Cubone21 <kyuboun@gmail.com>
2020-08-05 15:22:09 +00:00
When click import template popup submit button
2020-05-13 20:49:31 +00:00
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"
chore(e2e): update selectors and add containerization (#19221) * update: patch in tests from bonitoo-io/selenium-accept-infl2 * fix: add dataExplorer.feature - forgotten yesterday * update: refactor e2e test configuration * update: set actual cloud credentials in config * fix: issue with headless switch in config * update: WIP cloud experim and refactoring to use client libs * update: sync variablesTab with upstream changes * fix: clumsy use of resultObserver without promise * fix: troubleshoot merge issue * wip: Refactor using client APIs. * wip: refactoring tests with new client API * update: tokens tests * wip: fixing variables tests * fix: selectors for settings variables tests * update: update selectors for dashboards and cellEdit * e2e(fix): update selectors for generic popup * e2e(fix): fix note cell test * e2e(circleci): try and force nightly build * e2e(circleci): try and force nightly build bis * e2e(circleci): troubleshoot build issues * e2e(circleci): fix type * e2e(circleci): check circleci build * e2e(circleci): troubleshoot build failure * e2e(circleci): troubleshout circleci build * e2e(circleci): troubleshoot circleci build issues * e2e(circleci): troubleshoot build schedule * e2e(update): wip updating alerts selectors * e2e(circleci): troubleshoot reporting from tests * e2e(update): fix alert selectors - WIP * e2e(circleci): troubleshoot reporting issues in circleci * e2e(update): monitoring selector fixes * e2e(circleci): troubleshoot reporting issues * e2e(update): fix monitoring selectors * e2e(circleci): change cron trigger schedule for bonitoo * e2e(config): add ENV to declare username * test: add semantic commit * e2e: remove debug lines from old config.yml * fix(temp): remove bonitoo workflow from config.yml * fix(e2e): reset cron for hourly-e2e to original values * dataExplorer.feature new scenarios * fix(e2e): generalize urls in telegraf asserts * fix(e2e): troubleshoot circleci build * fix: update .circleci/config.yml nightly acceptance test and sync with upstream * fix(e2e): troubleshoot network issues on jenkins * fix(e2): troubleshoot jenkins failures * fix(e2e): troubleshoot jenkins issues * fix(e2e): troubleshoot jenkins failures * fix(e2e): troubleshoot test issues - change page load strategy * fix(e2e): troubleshoot build issues * fix(e2e): troubleshoot build issues * fix(e2e): add paranoia checks on using UI signin * fix(e2e): troubleshoot test issues * fix(e2e): change handling of env params * fix(e2e): troubleshoot signin stale elem issue * fix(e2e): typo * fix(e2e): synch selectors with recent UI changes * fix(e2e): update check for stale element on signin * fix(e2e): fine tune retry on stale element signin * fix(e2e): lengthen signin retry * fix(e2): try second stale element workaround * fix(e2): attempt to workaround stale element * fix(e2): try cruder solution to stale element on sign in * fix(e2): lengthen timeout for signing page load * fix(e2e): clear notifications before save in dataexplorer * fixes(e2e): update variables button selector * fix(e2e): cleanup data explorer test variable - from browser * fixes(e2e): stash experim changes to cucumber.js * fixes(e2e): troubleshoot deadman check failure * fix(e2e): stash cucumber.js * fix(e2e): update selectors for telegraf delete * fixes(e2e): extend timeout for input to monaco * fixes(e2e): troubleshoot timeout issue on paste into monaco * fixes(e2e): safety commit containerize * fixes(e2e): generic page header no longer applies - temp fix * fixes(e2e): changes to headers temp fixes * chore(e2e): stash acceptance test containerize work * chore(e2e): clean debug messages * feat(e2e): commandline args in containerized test script * fixes(e2e): add junit report generation to container script * fixes(e2e): set delay for selenoid startup * fixes(e2e): stop docker containers after tests * fix(e2e): drop bonitoo argv args before cucumber calls ArgvParser * chore(e2e): update README and remove experim naming * fix(e2e): troubleshoot occasional flake in notification assertions * feat(e2e): add simple performance utility for cloud * feat(e2e): tweek performance util * feat(e2e): start cloud testing with containerized tests * fix(e2e): halt script on unset required params * fix(e2e): remove messages that could leak info * fix(e2e): troubleshoot jenkins credentials * fix(e2e): troubleshoot parameter issues in jenkins * fix(e2e): cleanup troubleshoot code * fix(e2e): update create variables popup selector * fix(e2e): update submit button for template popup * fix(e2e): update selectors for data tokens tests * fix(e2e): sync alerts tests with recent changes * chore(e2e): add cloud specific Dockerfile * chore(e2e): add reporting to cloud dockerfile Co-authored-by: Cubone21 <kyuboun@gmail.com>
2020-08-05 15:22:09 +00:00
When click import template popup submit button
2020-05-13 20:49:31 +00:00
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 |