diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-06-26 14:38:05 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-30 13:00:13 +0200 |
commit | 029649c05cbf9edfc80d4552dec479ab24d4872c (patch) | |
tree | ea93a8e307401c15e02340dfcd42e775e4c5d547 /ipatests | |
parent | b36a3c693b7eeb36b25eac11da89c0dd5446eb71 (diff) | |
download | freeipa-029649c05cbf9edfc80d4552dec479ab24d4872c.tar.gz freeipa-029649c05cbf9edfc80d4552dec479ab24d4872c.tar.xz freeipa-029649c05cbf9edfc80d4552dec479ab24d4872c.zip |
webui-ci: fix action list action visibility and enablement assertion
The new html structure was not addressed properly.
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_webui/ui_driver.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 3f40efd5a..047009a29 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -1734,16 +1734,17 @@ class UI_driver(object): if not parent: parent = self.get_form() - s = ".facet-actions li[data-name='%s'] a" % action - link = self.find(s, By.CSS_SELECTOR, parent) + s = ".facet-actions li[data-name='%s']" % action + li = self.find(s, By.CSS_SELECTOR, parent) + link = self.find("a", By.CSS_SELECTOR, li) - is_visible = link is not None and link.is_displayed() + is_visible = li is not None and link is not None is_enabled = False assert is_visible == visible, ('Invalid visibility of action item: %s. ' 'Expected: %s') % (action, str(visible)) if is_visible: - is_enabled = not self.has_class(link, 'disabled') + is_enabled = not self.has_class(li, 'disabled') assert is_enabled == enabled, ('Invalid enabled state of action item %s. ' 'Expected: %s') % (action, str(visible)) |