#8092 Nightly test failure in test_webui/test_loginscreen.py::TestLoginScreen::()::test_reset_password_and_login_view
Closed: fixed by sumenon. Opened by frenaud.

Issue

The nightly test test_webui_general is randomly failing in test_webui/test_loginscreen.py::TestLoginScreen::()::test_reset_password_and_login_view

Last failures seen:
- on ipa-4-8 branch: PR #3770, logs
- on master branch: PR #3763, logs

Need to investigate if this is a bug or if we need to make the test more robust.


Metadata Update from @pcech:
- Issue tagged with: Eagle

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

Another failure: logs, PR

Another failure: logs, PR

Another failure: logs, PR331

Another failure: PR343, logs

Another failure: PR356, logs

Another failure in PR 374 , logs

Another failure: PR384, logs

Another failure: PR409, logs

Another failure in PR414 with [testing_master_latest]

Another failure: PR424, logs

Also happened in PR #1314:

self = <ipatests.test_webui.test_loginscreen.TestLoginScreen object at 0x7f4c3aa82e80>
    @screenshot
    def test_reset_password_and_login_view(self):
>       self.load_reset_and_login_view()
test_webui/test_loginscreen.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_webui/test_loginscreen.py:284: in load_reset_and_login_view
    self.assert_notification(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ipatests.test_webui.test_loginscreen.TestLoginScreen object at 0x7f4c3aa82e80>
type = 'info'
assert_text = 'Your password has expired. Please enter a new password.'
link_text = None, link_url = None
    def assert_notification(self, type='success', assert_text=None,
                            link_text=None, link_url=None):
        """
        Assert whether we have a notification of particular type
        """
        notification_type = 'div.validation-summary .alert-{}'.format(type)
        # wait for a half sec for notification to appear
        self.wait(0.5)
        is_present = self.find(notification_type, By.CSS_SELECTOR)
        # Notification not present
>       assert is_present
E       assert None
test_webui/test_loginscreen.py:73: AssertionError

Also happened in [testing_master_previous], PR #1958, fedora35, logs

This issue has been happening more and more frequently recently.
The test is filling the form in order to reset the current user's password and login, then waits 0.5s and checks if the notification "Password change complete" appears.
The webui seems quicker now, and after 0.5s the notification has already disappeared because the screenshot for the test failure already displays the user details screen (see for instance in PR #2935, the screenshot for the failure).

The test needs to be modified (either lower the wait duration or check differently if the password change succeeded).

Metadata Update from @mpolovka:
- Issue assigned to mpolovka

Metadata Update from @mpolovka:
- Issue assigned to ebelko (was: mpolovka)

Metadata Update from @dhanina:
- Issue assigned to dhanina (was: ebelko)

master:

  • a6a4d9e14532d0ddd61787a57d6512ce4b61c095 Fix flaky notification assert for webui

ipa-4-13:

  • e269c7159e06d8d86f75de3025ad6c3457d9b42e Fix flaky notification assert for webui

ipa-4-12:

  • 25bdd44a6795733a7825a78f42f0c05b4d2c62a2 Fix flaky notification assert for webui

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

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

Metadata