Fixes CA-less CI test fail

The new html structure was not addressed properly.
--
Petr Vobornik
From a0e2e83470d1ca2c5f6f286e59588b10eb5f75bc Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Thu, 26 Jun 2014 14:38:05 +0200
Subject: [PATCH] webui-ci: fix action list action visibility and enablement
 assertion

The new html structure was not addressed properly.
---
 ipatests/test_webui/ui_driver.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py
index 3f40efd5a35691508185604349ae208a472000b9..047009a295838d0053c9c0e378e97b480db6a0e7 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))
-- 
1.9.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to