Merge pull request #11292 from edx/zoldak/phantom-bok-choy
Harden page objects
This commit is contained in:
@@ -43,7 +43,10 @@ class LearnerProfilePage(FieldsMixin, PageObject):
|
|||||||
"""
|
"""
|
||||||
Check if browser is showing correct page.
|
Check if browser is showing correct page.
|
||||||
"""
|
"""
|
||||||
return self.q(css='body.view-profile .account-settings-container').present
|
return all([
|
||||||
|
self.q(css='body.view-profile .account-settings-container').present,
|
||||||
|
not self.q(css='ui-loading-indicator').visible
|
||||||
|
])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def privacy(self):
|
def privacy(self):
|
||||||
|
|||||||
@@ -454,7 +454,11 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
|
|||||||
BOTTOM_ADD_SECTION_BUTTON = '.outline > .add-section .button-new'
|
BOTTOM_ADD_SECTION_BUTTON = '.outline > .add-section .button-new'
|
||||||
|
|
||||||
def is_browser_on_page(self):
|
def is_browser_on_page(self):
|
||||||
return self.q(css='body.view-outline').present and self.q(css='div.ui-loading.is-hidden').present
|
return all([
|
||||||
|
self.q(css='body.view-outline').present,
|
||||||
|
self.q(css='.content-primary').present,
|
||||||
|
self.q(css='div.ui-loading.is-hidden').present
|
||||||
|
])
|
||||||
|
|
||||||
def view_live(self):
|
def view_live(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -19,17 +19,10 @@ class GroupConfigurationsPage(CoursePage):
|
|||||||
"""
|
"""
|
||||||
Verify that the browser is on the page and it is not still loading.
|
Verify that the browser is on the page and it is not still loading.
|
||||||
"""
|
"""
|
||||||
EmptyPromise(
|
return all([
|
||||||
lambda: self.q(css='body.view-group-configurations').present,
|
self.q(css='body.view-group-configurations').present,
|
||||||
'On the group configuration page'
|
self.q(css='div.ui-loading.is-hidden').present
|
||||||
).fulfill()
|
])
|
||||||
|
|
||||||
EmptyPromise(
|
|
||||||
lambda: not self.q(css='span.spin').visible,
|
|
||||||
'Group Configurations are finished loading'
|
|
||||||
).fulfill()
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def experiment_group_configurations(self):
|
def experiment_group_configurations(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user