Commit 3c838081 by Ben McMorran

Merge pull request #4223 from edx/benmcmorran/increase-notification-timeout

Increases wait_for_notification timeout to 60 seconds
parents 1ce460be 400731c8
...@@ -26,15 +26,15 @@ def wait_for_notification(page): ...@@ -26,15 +26,15 @@ def wait_for_notification(page):
Waits for the "mini-notification" to appear and disappear on the given page (subclass of PageObject). Waits for the "mini-notification" to appear and disappear on the given page (subclass of PageObject).
""" """
def _is_saving(): def _is_saving():
num_notifications = len(page.q(css='.wrapper-notification-mini.is-shown')) num_notifications = page.q(css='.wrapper-notification-mini.is-shown').present
return (num_notifications == 1, num_notifications) return (num_notifications == 1, num_notifications)
def _is_saving_done(): def _is_saving_done():
num_notifications = len(page.q(css='.wrapper-notification-mini.is-hiding')) num_notifications = page.q(css='.wrapper-notification-mini.is-hiding').present
return (num_notifications == 1, num_notifications) return (num_notifications == 1, num_notifications)
Promise(_is_saving, 'Notification should have been shown.').fulfill() Promise(_is_saving, 'Notification should have been shown.', timeout=60).fulfill()
Promise(_is_saving_done, 'Notification should have been hidden.').fulfill() Promise(_is_saving_done, 'Notification should have been hidden.', timeout=60).fulfill()
def add_discussion(page, menu_index): def add_discussion(page, menu_index):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment