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()`.
This commit is contained in:
Ben Patterson
2016-02-27 12:37:13 -05:00
parent 4653301516
commit 18e1aaa320
2 changed files with 1 additions and 2 deletions

View File

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

View File

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