Merge pull request #9667 from edx/peter-fogg/join-team-redirect

Fix redirecting to topics page after joining a team.
This commit is contained in:
Peter Fogg
2015-09-10 12:46:29 -04:00
4 changed files with 32 additions and 6 deletions

View File

@@ -23,6 +23,10 @@ CREATE_TEAM_LINK_CSS = '.create-team'
class TeamCardsMixin(object):
"""Provides common operations on the team card component."""
def view_first_team(self):
"""Click the 'view' button of the first team card on the page."""
self.q(css='a.action-view').first.click()
@property
def team_cards(self):
"""Get all the team cards on the page."""

View File

@@ -1550,7 +1550,9 @@ class TeamPageTest(TeamsTabBase):
And if I switch to "My Team", the team I have joined is displayed
"""
self._set_team_configuration_and_membership(create_membership=False)
self.team_page.visit()
teams_page = BrowseTeamsPage(self.browser, self.course_id, self.topic)
teams_page.visit()
teams_page.view_first_team()
self.assertTrue(self.team_page.join_team_button_present)
expected_events = [
{
@@ -1567,7 +1569,7 @@ class TeamPageTest(TeamsTabBase):
self.assertFalse(self.team_page.join_team_message_present)
self.assert_team_details(num_members=1, is_member=True)
# Verify that if one switches to "My Team" without reloading the page, the newly created team is shown.
# Verify that if one switches to "My Team" without reloading the page, the newly joined team is shown.
self.teams_page.click_all_topics()
self.verify_my_team_count(1)