Fix Kibana Selenium tests

XPath to expected element was changed after
Kibana upgrade, this commit changes XPath
according chnges in new Kibana.

Change-Id: I501de225e1226991db9c263cedf38397cda7b51f
This commit is contained in:
dmyrhorodskyi 2020-03-11 17:57:40 +02:00
parent e60437bc9d
commit 49b50d632b
2 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ export KIBANA_USER="admin"
export KIBANA_PASSWORD="changeme"
export KIBANA_URI="kibana.osh-infra.svc.cluster.local"
export KERNEL_QUERY="discover?_g=()&_a=(columns:!(_source),index:'kernel-*',interval:auto,query:(match_all:()),sort:!('@timestamp',desc))"
export JOURNAL_QUERY="discover?_g=()&_a=(columns:!(_source),index:'journal-*',interval:auto,query:(match_all:()),sort:!('@timestamp',desc))"
export LOGSTASH_QUERY="discover?_g=()&_a=(columns:!(_source),index:'logstash-*',interval:auto,query:(match_all:()),sort:!('@timestamp',desc))"
export KERNEL_QUERY="discove?r_g=()&_a=(columns:!(_source),index:'kernel*',interval:auto,query:(language:kuery,query:''),sort:!('@timestamp',desc))"
export JOURNAL_QUERY="discove?r_g=()&_a=(columns:!(_source),index:'journal*',interval:auto,query:(language:kuery,query:''),sort:!('@timestamp',desc))"
export LOGSTASH_QUERY="discove?r_g=()&_a=(columns:!(_source),index:'logstash*',interval:auto,query:(language:kuery,query:''),sort:!('@timestamp',desc))"
python3 tools/gate/selenium/kibanaSelenium.py

View File

@ -56,8 +56,8 @@ for query, name in queries:
st.browser.get(query_url)
WebDriverWait(st.browser, 60).until(
EC.presence_of_element_located(
(By.XPATH, '//*[@id="kibana-body"]/div[1]/div/div/div[3]/'
'discover-app/div/div[2]/div[2]/div/div[2]/div[2]/'
(By.XPATH, '/html/body/div[2]/div/div/div/div[3]/'
'discover-app/main/div/div[2]/div/div[2]/section[2]/'
'doc-table/div/table/tbody/tr[1]/td[2]')
)
)