#9574 Nightly failure in test_webui/test_user.py::test_user::test_disable_delete_admin
Closed: fixed by frenaud. Opened by frenaud.

Issue

The nightly test test_webui/test_user.py::test_user::test_disable_delete_admin is failing in PR #3568, with the following logs and report:

self = <ipatests.test_webui.test_user.test_user object at 0x7f9643ab2b10>
    @screenshot
    def test_disable_delete_admin(self):
        """
        Test disabling/deleting admin is not allowed
        """
        self.init_app()
        self.navigate_to_entity(user.ENTITY)
        # try to disable admin user
        self.select_record('admin')
        self.facet_button_click('disable')
        self.dialog_button_click('ok')
>       self.assert_last_error_dialog(ERR_ADMIN_DEL, details=True)
test_webui/test_user.py:551: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_webui/ui_driver.py:2381: in assert_last_error_dialog
    self.assert_text(s, expected_err, parent=err_dialog)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ipatests.test_webui.test_user.test_user object at 0x7f9643ab2b10>
selector = 'ul.error-container li p'
value = 'user admin cannot be deleted/modified: privileged user'
parent = <selenium.webdriver.remote.webelement.WebElement (session="c65b0fa6-7209-49da-9441-4e8349b837a9", element="643fd837-fcdb-4849-a751-969185c4edc4")>
    def assert_text(self, selector, value, parent=None):
        """
        Assert read-only text value in details page or in a form
        """
        text = self.get_text(selector, parent)
        text = text.strip()
        value = value.strip()
>       assert text == value, "Invalid value: '%s' Expected: %s" % (text, value)
E       AssertionError: Invalid value: 'admin cannot be deleted or disabled because it is the last member of group admins' Expected: user admin cannot be deleted/modified: privileged user
test_webui/ui_driver.py:2076: AssertionError

The regression was introduced with commit 6b0f6ff Allow the admin user to be disabled which modified the message for admin deletion.

The test needs to be fixed with the new expected message.


Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7323

master:

  • dda223668acf76f19efc6b85829139beba424cd6 webui test: Update message for admin disable

ipa-4-11:

  • 0ccff908ce774837b0c30cd8fa07545615370a59 webui test: Update message for admin disable

ipa-4-10:

  • d2fa1241294a8886cc79b6f6da23963b27656223 webui test: Update message for admin disable

ipa-4-9:

  • 36d093374d0a59e52cd1759de5469938a4ed72fb webui test: Update message for admin disable

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata