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:
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user