'Scenario: browsing topics should not respond to invalid page numbers
Given I am enrolled in a course with team configuration and topics
When I visit the Teams page
And I browse topics
When I press the next page button
Then I should move to the next page
When I press the previous page button
Then I should move to the previous page'

def test_page_navigation_buttons(self):

    self.set_team_configuration({u'max_team_size': 10, u'topics': self.create_topics(13)})
    self.topics_page.visit()
    self.topics_page.press_next_page_button()
    self.assertEqual(len(self.topics_page.topic_cards), 1)
    self.assertTrue(self.topics_page.get_pagination_header_text().startswith('Showing    13-13    out    of    13    total'))
    self.topics_page.press_previous_page_button()
    self.assertEqual(len(self.topics_page.topic_cards), TOPICS_PER_PAGE)
    self.assertTrue(self.topics_page.get_pagination_header_text().startswith('Showing    1-12    out    of    13    total'))
