Fix empty promise. It was always evaluating to true.

This addresses TNL-1808 (and likely other flaky tests
in this area).
This commit is contained in:
Ben Patterson
2015-03-26 12:26:15 -04:00
parent 9edda95096
commit dae5cdfceb

View File

@@ -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))