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:
Eric Fischer
2015-08-17 17:09:25 -04:00
parent 350d15876a
commit ab3b2ebd9a

View File

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