OwnLearnerProfile tests multiprocessing support.

Fix a flaky test condition that only occurs in
multiprocessing mode. Make the page definition more
specific; the previous implementation would not fully
render all objects in time.

Avoid race condition related to events order (in faster,
multiprocess testing, the order is not exactly the same since
some events arrive at once).
This commit is contained in:
Ben Patterson
2015-11-21 10:43:07 -05:00
parent 8610b6ded6
commit 0071c9d322
2 changed files with 6 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ class LearnerProfilePage(FieldsMixin, PageObject):
"""
Check if browser is showing correct page.
"""
return self.q(css='body.view-profile').present
return self.q(css='body.view-profile .account-settings-container').present
@property
def privacy(self):

View File

@@ -1381,7 +1381,11 @@ class EditTeamTest(TeamFormActions):
}
},
]
with self.assert_events_match_during(event_filter=self.only_team_events, expected_events=expected_events):
with self.assert_events_match_during(
event_filter=self.only_team_events,
expected_events=expected_events,
in_order=False,
):
self.team_management_page.submit_form()
self.team_page.wait_for_page()