From ab3b2ebd9a14cb821b3d29fe30017cf3530bdd53 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 17 Aug 2015 17:09:25 -0400 Subject: [PATCH] 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. --- common/test/acceptance/tests/lms/test_teams.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/test/acceptance/tests/lms/test_teams.py b/common/test/acceptance/tests/lms/test_teams.py index dfa521ac06..5844f0e4c9 100644 --- a/common/test/acceptance/tests/lms/test_teams.py +++ b/common/test/acceptance/tests/lms/test_teams.py @@ -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'))