From 18e1aaa320098f8bc8099bd19fe2449174a023d9 Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Sat, 27 Feb 2016 12:37:13 -0500 Subject: [PATCH] Ensuring page is loaded belongs in the page object. TNL-4151 had previously been fixed to avoid a flaky condition; however, that only passed the flaky condition to a later point in the test. The proper fix is to ensure the page has loaded. Putting the definition in this method will mean that the page will wait to load with other functions, such as `DashboardPage.visit()`. --- common/test/acceptance/pages/studio/index.py | 2 +- common/test/acceptance/tests/studio/test_studio_home.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common/test/acceptance/pages/studio/index.py b/common/test/acceptance/pages/studio/index.py index f6f122e581..ed6bd4158a 100644 --- a/common/test/acceptance/pages/studio/index.py +++ b/common/test/acceptance/pages/studio/index.py @@ -15,7 +15,7 @@ class DashboardPage(PageObject): url = BASE_URL + "/course/" def is_browser_on_page(self): - return self.q(css='body.view-dashboard').present + return self.q(css='.content-primary').visible @property def course_runs(self): diff --git a/common/test/acceptance/tests/studio/test_studio_home.py b/common/test/acceptance/tests/studio/test_studio_home.py index beedba6b64..3b4c8d31b0 100644 --- a/common/test/acceptance/tests/studio/test_studio_home.py +++ b/common/test/acceptance/tests/studio/test_studio_home.py @@ -49,7 +49,6 @@ class CreateLibraryTest(WebAppTest): self.auth_page.visit() self.dashboard_page.visit() - self.dashboard_page.wait_for_element_visibility('.content-primary', 'See library list.') self.assertFalse(self.dashboard_page.has_library(name=name, org=org, number=number)) self.assertTrue(self.dashboard_page.has_new_library_button())