summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-10-25 16:54:28 +0200
committerMartin Basti <mbasti@redhat.com>2017-03-14 10:40:10 +0100
commit0808504ba1ab743acdf4231876d49c26dbae6621 (patch)
tree5970cd4078bf99f1f877e1c15bd18fe7ac7d602f
parentab8c69f4c602c0eaefbb058c108428ca30a80e98 (diff)
downloadfreeipa-0808504ba1ab743acdf4231876d49c26dbae6621.tar.gz
freeipa-0808504ba1ab743acdf4231876d49c26dbae6621.tar.xz
freeipa-0808504ba1ab743acdf4231876d49c26dbae6621.zip
TESTS: Add support for sidebar with facets
Part of: https://fedorahosted.org/freeipa/ticket/5426 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
-rw-r--r--ipatests/test_webui/ui_driver.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py
index 62dcced08..23d8127a9 100644
--- a/ipatests/test_webui/ui_driver.py
+++ b/ipatests/test_webui/ui_driver.py
@@ -451,8 +451,18 @@ class UI_driver(object):
Click on tab with given name
"""
facet = self.get_facet()
- s = "div.facet-tabs li[name='%s'] a" % name
- link = self.find(s, By.CSS_SELECTOR, facet, strict=True)
+ tabs = "div.facet-tabs"
+ sidebar = "div.sidebar-pf"
+
+ facets_container = self.find(tabs, By.CSS_SELECTOR, facet)
+
+ # handle sidebar instead of facet-tabs
+ # the webui facet can have only the facet-tabs OR sidebar, not both
+ if not facets_container:
+ facets_container = self.find(sidebar, By.CSS_SELECTOR, facet)
+
+ s = "li[name='%s'] a" % name
+ link = self.find(s, By.CSS_SELECTOR, facets_container, strict=True)
link.click()
# double wait because of facet's paging
self.wait_for_request(0.5)