From dae5cdfceb13812d761aa19b63c82cea55049ebe Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Thu, 26 Mar 2015 12:26:15 -0400 Subject: [PATCH] Fix empty promise. It was always evaluating to true. This addresses TNL-1808 (and likely other flaky tests in this area). --- common/test/acceptance/pages/lms/instructor_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index e43d58c001..f030da5910 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -400,7 +400,7 @@ class CohortManagementSection(PageObject): """ if wait_for_messages: EmptyPromise( - lambda: self.q(css=self._bounded_selector(title_css)).results != 0, + lambda: len(self.q(css=self._bounded_selector(title_css)).results) != 0, "Waiting for messages to appear" ).fulfill() message_title = self.q(css=self._bounded_selector(title_css))