Re: [Freeipa-devel] [PATCH] 691 webui-ci: fix action list action visibility and enablement assertion

2014-06-30 Thread Petr Vobornik

On 28.6.2014 02:04, Endi Sukma Dewata wrote:

On 6/26/2014 9:15 AM, Petr Vobornik wrote:

Fixes CA-less CI test fail

The new html structure was not addressed properly.


The new code is checking for the 'disabled' class in the list element,
not the link element, is this correct?

   is_enabled = not self.has_class(li, 'disabled')


Yes, the html structure of a disabled item is:

li data-name=enable role=presentation class=disabled
a href=#enable tabindex=-1 Enable/a
/li



If test works, ACK.



Pushed to master: 029649c05cbf9edfc80d4552dec479ab24d4872c
--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 691 webui-ci: fix action list action visibility and enablement assertion

2014-06-27 Thread Endi Sukma Dewata

On 6/26/2014 9:15 AM, Petr Vobornik wrote:

Fixes CA-less CI test fail

The new html structure was not addressed properly.


The new code is checking for the 'disabled' class in the list element, 
not the link element, is this correct?


  is_enabled = not self.has_class(li, 'disabled')

If test works, ACK.

--
Endi S. Dewata

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


[Freeipa-devel] [PATCH] 691 webui-ci: fix action list action visibility and enablement assertion

2014-06-26 Thread Petr Vobornik

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