Fix selenium test for additional compatibility.

Change-Id: I2b5bd47d1a648813987ff10184d2468473454dfd
This commit is contained in:
Omar Munoz 2024-05-15 15:50:24 -05:00 committed by Sergio Omar Munoz
parent 096958388a
commit 6d399c3831
3 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v9.2.10 appVersion: v9.2.10
description: OpenStack-Helm Grafana description: OpenStack-Helm Grafana
name: grafana name: grafana
version: 0.1.22 version: 0.1.23
home: https://grafana.com/ home: https://grafana.com/
sources: sources:
- https://github.com/grafana/grafana - https://github.com/grafana/grafana

View File

@ -83,11 +83,11 @@ try:
{{- if .Values.selenium_v4 }} {{- if .Values.selenium_v4 }}
browser.find_element(By.NAME, 'user').send_keys(username) browser.find_element(By.NAME, 'user').send_keys(username)
browser.find_element(By.NAME, 'password').send_keys(password) browser.find_element(By.NAME, 'password').send_keys(password)
browser.find_element(By.CSS_SELECTOR, '[aria-label="Login button"]').click() browser.find_element(By.CSS_SELECTOR, '[type="submit"]').click()
{{- else }} {{- else }}
browser.find_element_by_name('user').send_keys(username) browser.find_element_by_name('user').send_keys(username)
browser.find_element_by_name('password').send_keys(password) browser.find_element_by_name('password').send_keys(password)
browser.find_element_by_css_selector('[aria-label="Login button"]').click() browser.find_element_by_css_selector('[type="submit"]').click()
{{- end }} {{- end }}
logger.info("Successfully logged in to Grafana") logger.info("Successfully logged in to Grafana")
except NoSuchElementException: except NoSuchElementException:

View File

@ -23,4 +23,5 @@ grafana:
- 0.1.20 Upgrade osh-selenium image to latest-ubuntu_focal - 0.1.20 Upgrade osh-selenium image to latest-ubuntu_focal
- 0.1.21 Fix run migrator job deployment condition - 0.1.21 Fix run migrator job deployment condition
- 0.1.22 Make selenium v4 syntax optional - 0.1.22 Make selenium v4 syntax optional
- 0.1.23 Modified selenium test for compatibility
... ...