'Scenario: The user with specified role should see the edit team button.
Given I am user with privileged role for a course with a team
When I visit the Team profile page
Then I should see the Edit Team button'

@ddt.data('Moderator', 'Community    TA', 'Administrator')
def test_discussion_privileged_user_can_edit_team(self, role):

    kwargs = {'course_id': self.course_id, 'staff': False}
    if (role is not None):
        kwargs['roles'] = role
    AutoAuthPage(self.browser, **kwargs).visit()
    self.team_page.visit()
    self.teams_page.wait_for_page()
    self.assertTrue(self.team_page.edit_team_button_present)
    self.verify_team_info(name=self.team['name'], description=self.team['description'], location='Afghanistan', language='Afar')
    self.verify_and_navigate_to_edit_team_page()
    self.fill_create_or_edit_form()
    self.team_management_page.submit_form()
    self.team_page.wait_for_page()
    self.verify_team_info(name=self.TEAMS_NAME, description=self.TEAM_DESCRIPTION, location='Pakistan', language='English')
