'Scenario: The user should be able to cancel the creation of new team.
Given I am enrolled in a course with a team configuration and a topic
When I visit the Create Team page for that topic
Then I should see the Create Team header and form
When I click Cancel button
Then I should see teams list page without any new team.
And if I switch to "My Team", it shows no teams'

def test_user_can_cancel_the_team_creation(self):

    self.assertTrue(self.browse_teams_page.get_pagination_header_text().startswith('Showing    0    out    of    0    total'))
    self.verify_and_navigate_to_create_team_page()
    time.sleep(0.5)
    self.team_management_page.cancel_team()
    self.browse_teams_page.wait_for_page()
    self.assertTrue(self.browse_teams_page.get_pagination_header_text().startswith('Showing    0    out    of    0    total'))
    self.teams_page.click_all_topics()
    self.teams_page.verify_team_count_in_first_topic(0)
    self.verify_my_team_count(0)
