summaryrefslogtreecommitdiff
path: root/service/test/functional/features/steps/common.py
diff options
context:
space:
mode:
authorkaeff <hi@kaeff.net>2015-08-17 20:45:10 +0200
committerkaeff <hi@kaeff.net>2015-08-17 20:56:27 +0200
commitaee74ce5144d098825f6fb1b4a46b68c0af2f841 (patch)
tree2668e33072760f7bcb339fdd739fee6130aa2b50 /service/test/functional/features/steps/common.py
parentb16bae353e40fa05b4993ef68232a9df83db370e (diff)
2 attempts against flakiness of checkboxes_and_mailboxes
1) Explicitly load inbox to avoid test fails before mail appears 2) Use "loading..." notification to check whether deleting mail has already been completed checkboxes_and_mailboxes.feature spends a lot time waiting (even if the step is already executed logically) as one can see when running tests in Firefox. This test is a good candidate for speed optimization.
Diffstat (limited to 'service/test/functional/features/steps/common.py')
-rw-r--r--service/test/functional/features/steps/common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/common.py b/service/test/functional/features/steps/common.py
index 96c51a6e..d77e9903 100644
--- a/service/test/functional/features/steps/common.py
+++ b/service/test/functional/features/steps/common.py
@@ -24,6 +24,8 @@ from twisted.internet import defer
from test.support.integration import MailBuilder
+LOADING = 'loading'
+
TIMEOUT_IN_S = 20
@@ -42,6 +44,9 @@ def wait_until_element_is_deleted(context, locator_tuple, timeout=TIMEOUT_IN_S):
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)
+def wait_for_user_alert_to_appear_and_disapear(context, timeout=TIMEOUT_IN_S):
+ wait_until_element_is_visible_by_locator(context, (By.ID, LOADING), timeout)
+ wait_until_element_is_invisible_by_locator(context, (By.ID, LOADING), timeout)
def wait_until_elements_are_visible_by_locator(context, locator_tuple, timeout=TIMEOUT_IN_S):
spend_time_in_reactor()