From 01b7be57b7e341ea21eaa136b12a532f651d9c30 Mon Sep 17 00:00:00 2001 From: kaeff Date: Tue, 8 Sep 2015 16:49:22 +0200 Subject: Another try for flaky checkboxes FT: Wait until loading finished A reincarnation of 0e42b6d. While waiting for appear/disappear didn't help, the current CI failures seem to be related to a sync still be going on. --- service/test/functional/features/steps/common.py | 3 +++ service/test/functional/features/steps/mail_list.py | 1 + 2 files changed, 4 insertions(+) (limited to 'service/test/functional/features/steps') 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')) -- cgit v1.2.3