From 1b7d5f347d7a6636a53e27f8e2d9aaeb0b5f317a Mon Sep 17 00:00:00 2001 From: Waqas Khalid Date: Wed, 7 Jan 2015 17:20:10 +0500 Subject: [PATCH] Test pagination reposition test is failing Test pagination reposition test is failing on release and master. It was flaky test and this problem was caused by the javascript animation. Issue was fixed by adding the promise that we check the value of window top after the animation is completed. --- common/test/acceptance/pages/lms/discussion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/test/acceptance/pages/lms/discussion.py b/common/test/acceptance/pages/lms/discussion.py index b26c1e066a..e923334ddb 100644 --- a/common/test/acceptance/pages/lms/discussion.py +++ b/common/test/acceptance/pages/lms/discussion.py @@ -406,12 +406,24 @@ class DiscussionUserProfilePage(CoursePage): def click_prev_page(self): self._click_pager_with_text(self.TEXT_PREV, self.get_current_page() - 1) + EmptyPromise( + self.is_window_on_top, + "Window is on top" + ).fulfill() def click_next_page(self): self._click_pager_with_text(self.TEXT_NEXT, self.get_current_page() + 1) + EmptyPromise( + self.is_window_on_top, + "Window is on top" + ).fulfill() def click_on_page(self, page_number): self._click_pager_with_text(unicode(page_number), page_number) + EmptyPromise( + self.is_window_on_top, + "Window is on top" + ).fulfill() class DiscussionTabHomePage(CoursePage, DiscussionPageMixin):