influxdb/e2e
karel-rehor 14db46c1a0
fixes(e2e): selector updates and timing fixes (#18846)
* 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): 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): 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): troubleshoot deadman check failure

* 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): generic page header no longer applies - temp fix

* fixes(e2e): changes to headers temp fixes

Co-authored-by: Cubone21 <kyuboun@gmail.com>
2020-07-13 08:38:26 -07:00
..
.circleci chore(e2e): refactor and stablize tests (#18531) 2020-06-16 08:59:05 -06:00
etc/test-data fix: restore newlines with updated editorconfig 2020-06-25 18:16:57 +01:00
features fixes(e2e): selector updates and timing fixes (#18846) 2020-07-13 08:38:26 -07:00
scripts Cleanup the comments, according to the feedbacks 2020-05-13 16:39:45 -06:00
src fixes(e2e): selector updates and timing fixes (#18846) 2020-07-13 08:38:26 -07:00
.babelrc chore: import e2e tests 2020-05-13 14:55:16 -06:00
.eslintrc.json chore: import e2e tests 2020-05-13 14:55:16 -06:00
Makefile chore: import e2e tests 2020-05-13 14:55:16 -06:00
README.md chore: import e2e tests 2020-05-13 14:55:16 -06:00
cucumber.js fixes(e2e): selector updates and timing fixes (#18846) 2020-07-13 08:38:26 -07:00
e2e.conf.json chore(e2e): refactor and stablize tests (#18531) 2020-06-16 08:59:05 -06:00
hooks.js chore(e2e): refactor and stablize tests (#18531) 2020-06-16 08:59:05 -06:00
package.json chore(e2e): refactor and stablize tests (#18531) 2020-06-16 08:59:05 -06:00

README.md

Selenium-Accept

Selenium Acceptance tests for the Influxdbv2 UI.

Run cycle

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.

Tips

Run only the feature under development

npm test -- features/onboarding/onboarding.feature:4

Number is line number where the target scenario starts.

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.