mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
committed by
Martin Basti
parent
ab8c69f4c6
commit
0808504ba1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user