summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/test/functional/features/steps/common.py3
-rw-r--r--service/test/functional/features/steps/mail_list.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/common.py b/service/test/functional/features/steps/common.py
index 863fb6ca..a22a83ff 100644
--- a/service/test/functional/features/steps/common.py
+++ b/service/test/functional/features/steps/common.py
@@ -41,6 +41,9 @@ def wait_until_element_is_deleted(context, locator_tuple, timeout=TIMEOUT_IN_S):
wait.until(lambda s: len(s.find_elements(locator_tuple[0], locator_tuple[1])) == 0)
+def wait_for_loading_to_finish(context, timeout=TIMEOUT_IN_S):
+ wait_until_element_is_invisible_by_locator(context, (By.ID, 'loading'), timeout)
+
def wait_for_user_alert_to_disapear(context, timeout=TIMEOUT_IN_S):
wait_until_element_is_invisible_by_locator(context, (By.ID, 'user-alerts'), timeout)
diff --git a/service/test/functional/features/steps/mail_list.py b/service/test/functional/features/steps/mail_list.py
index 9b7bdb4a..26ed69b9 100644
--- a/service/test/functional/features/steps/mail_list.py
+++ b/service/test/functional/features/steps/mail_list.py
@@ -103,6 +103,7 @@ def impl(context):
last_email().find_element_by_tag_name('input').click()
find_element_by_id(context, 'delete-selected').click()
wait_for_user_alert_to_disapear(context)
+ wait_for_loading_to_finish(context)
spend_time_in_reactor()
assert 0 == len(context.browser.find_element_by_id('mail-list').find_elements_by_tag_name('li'))