'Scenario: Team names should be HTML-escaped on the teams page
Given I am enrolled in a course with teams enabled
When I visit the Teams page for a topic, with a team name containing JS code
Then I should not see any alerts'

def test_team_name_xss(self):

    self.post_team_data({'course_id': self.course_id, 'topic_id': self.topic['id'], 'name': '<script>alert("XSS")</script>', 'description': 'Description', 'language': 'aa', 'country': 'AF'})
    with self.assertRaises(TimeoutException):
        self.browser.get(self.browse_teams_page.url)
        alert = get_modal_alert(self.browser)
        alert.accept()
