Fixing problematic bok_choy test
By moving the team_page.first_member_username access to occur before click_first_profile_image() is called, we avoid a potential issue where the wrapper() method defined in page_object.py, which decorates the property, calls into _verify_page() and raises a WrongPageError.
This commit is contained in:
@@ -954,9 +954,11 @@ class TeamPageTest(TeamsTabBase):
|
||||
self._set_team_configuration_and_membership()
|
||||
self.team_page.visit()
|
||||
|
||||
learner_name = self.team_page.first_member_username
|
||||
|
||||
self.team_page.click_first_profile_image()
|
||||
|
||||
learner_profile_page = LearnerProfilePage(self.browser, self.team_page.first_member_username)
|
||||
learner_profile_page = LearnerProfilePage(self.browser, learner_name)
|
||||
learner_profile_page.wait_for_page()
|
||||
learner_profile_page.wait_for_field('username')
|
||||
self.assertTrue(learner_profile_page.field_is_visible('username'))
|
||||
|
||||
Reference in New Issue
Block a user