#8504 [WebUI] test_host.py::test_ca_less; test_service.py::test_ca_less failure
Opened 2 months ago by mpolovka. Modified 10 days ago

test_webui/test_service.py and test_webui/test_hosts.py are failing in ca_less environment on test test_ca_less.

test_service.py

Error
AssertionError: Invalid visibility of action item: request_cert. Expected: False
Stacktrace
self = <ipatests.test_webui.test_service.test_service object at 0x7ff90b2d61d0>
@screenshot
def test_ca_less(self):
"""
Test service certificate actions in CA-less install
http://www.freeipa.org/page/V3/CA-less_install
"""
if self.has_ca():
self.skip('CA is installed')
self.init_app()
data = self.prep_data()
pkey = data.get('pkey')
self.add_record(ENTITY, data)
self.navigate_to_record(pkey)
>       self.assert_action_list_action('request_cert', visible=False)
data = {'add': [('textbox', 'service', 'itest'), ('combobox', 'host', 'master.testrelm.test')], 'mod': [('checkbox', 'ipakrbokasdelegate', None)], 'pkey': 'itest/master.testrelm.test@TESTRELM.TEST'}
pkey = 'itest/master.testrelm.test@TESTRELM.TEST'
self = <ipatests.test_webui.test_service.test_service object at 0x7ff90b2d61d0>
test_webui/test_service.py:362:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ipatests.test_webui.test_service.test_service object at 0x7ff90b2d61d0>
action = 'request_cert', visible = False, enabled = True
parent = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="c7f1cf78-c428-4052-9431-a9e6d10b1b9e", element="f4de8f05-9527-4637-8f2b-8d200f807839")>
parents_css_sel = None, facet_actions = True
def assert_action_list_action(self, action, visible=True, enabled=True,
parent=None, parents_css_sel=None,
facet_actions=True):
"""
Assert that action dropdown action is visible/hidden, and enabled/disabled
Enabled is checked only if action is visible.
"""
li_s = " li[data-name='%s']" % action
if not parent:
parent = self.get_form()
if facet_actions:
li_s = ".facet-actions" + li_s
else:
li_s = parents_css_sel + li_s
li = self.find(li_s, By.CSS_SELECTOR, parent)
link = self.find("a", By.CSS_SELECTOR, li)
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))
E AssertionError: Invalid visibility of action item: request_cert. Expected: False
action = 'request_cert'
enabled = True
facet_actions = True
is_enabled = False
is_visible = True
li = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="c7f1cf78-c428-4052-9431-a9e6d10b1b9e", element="39fc3b3e-cb5e-4b55-ad7d-8826751fe2fc")>
li_s = ".facet-actions li[data-name='request_cert']"
link = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="c7f1cf78-c428-4052-9431-a9e6d10b1b9e", element="2e03c118-a721-446b-a1f2-9b249817c02e")>
parent = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="c7f1cf78-c428-4052-9431-a9e6d10b1b9e", element="f4de8f05-9527-4637-8f2b-8d200f807839")>
parents_css_sel = None
self = <ipatests.test_webui.test_service.test_service object at 0x7ff90b2d61d0>
visible = False
test_webui/ui_driver.py:2263: AssertionError

test_hosts.py

Error
AssertionError: Invalid visibility of action item: request_cert. Expected: False
Stacktrace
self = <ipatests.test_webui.test_host.test_host object at 0x7ff90b2f77b8>
@screenshot
def test_ca_less(self):
"""
Test host certificate actions in CA-less install
http://www.freeipa.org/page/V3/CA-less_install
"""
if self.has_ca():
self.skip('CA is installed')
self.init_app()
self.add_record(ENTITY, self.data)
self.navigate_to_record(self.pkey)
>       self.assert_action_list_action('request_cert', visible=False)
self = <ipatests.test_webui.test_host.test_host object at 0x7ff90b2f77b8>
test_webui/test_host.py:327:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ipatests.test_webui.test_host.test_host object at 0x7ff90b2f77b8>
action = 'request_cert', visible = False, enabled = True
parent = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="a71f27da-a84d-46d0-9e20-4f14c70b23ca", element="26a1a923-f8d1-4cb1-94e3-19a8a7f89cd1")>
parents_css_sel = None, facet_actions = True
def assert_action_list_action(self, action, visible=True, enabled=True,
parent=None, parents_css_sel=None,
facet_actions=True):
"""
Assert that action dropdown action is visible/hidden, and enabled/disabled
Enabled is checked only if action is visible.
"""
li_s = " li[data-name='%s']" % action
if not parent:
parent = self.get_form()
if facet_actions:
li_s = ".facet-actions" + li_s
else:
li_s = parents_css_sel + li_s
li = self.find(li_s, By.CSS_SELECTOR, parent)
link = self.find("a", By.CSS_SELECTOR, li)
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))
E AssertionError: Invalid visibility of action item: request_cert. Expected: False
action = 'request_cert'
enabled = True
facet_actions = True
is_enabled = False
is_visible = True
li = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="a71f27da-a84d-46d0-9e20-4f14c70b23ca", element="52a69412-8572-490f-8096-1f359bf3b6a7")>
li_s = ".facet-actions li[data-name='request_cert']"
link = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="a71f27da-a84d-46d0-9e20-4f14c70b23ca", element="617a0651-0a72-4323-bc7d-9dc21c2406a9")>
parent = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="a71f27da-a84d-46d0-9e20-4f14c70b23ca", element="26a1a923-f8d1-4cb1-94e3-19a8a7f89cd1")>
parents_css_sel = None
self = <ipatests.test_webui.test_host.test_host object at 0x7ff90b2f77b8>
visible = False
test_webui/ui_driver.py:2263: AssertionError

PR with tests fix opened at PR5110

Metadata Update from @frenaud:
- Issue tagged with: webui

10 days ago

Login to comment on this ticket.

Metadata