'Scenario: Next & Previous buttons are working as expected for search
Given that I am a registered user
And I have a course with 27 notes
When I open Notes page
Then I can see notes list with 25 items
And I should see paging header and footer with correct data
And previous button is disabled
And next button is enabled
When I run the search with "note" query
Then I see that "Search Results" tab appears with 26 notes found
And an event has fired indicating that the Search Results view was selected
And an event has fired recording the search that was performed
When I click on next page button in footer
Then I should be navigated to second page
And I should see a list with 1 item
And I should see paging header and footer with correct info
And I should see enabled previous button
And I should also see disabled next button
When I click on previous page button in footer
Then I should be navigated to first page
And I should see a list with 25 items
And I should see paging header and footer with correct info
And I should see disabled previous button
And I should also see enabled next button'

def test_search_with_next_and_prev_page_button(self):

    self.search_and_verify()
    self._verify_pagination_info(notes_count_on_current_page=25, header_text='Showing    1-25    out    of    26    total', previous_button_enabled=False, next_button_enabled=True, current_page_number=1, total_pages=2)
    self.assert_viewed_event('Search    Results')
    self.assert_search_event('note', 26)
    self.notes_page.press_next_page_button()
    self._verify_pagination_info(notes_count_on_current_page=1, header_text='Showing    26-26    out    of    26    total', previous_button_enabled=True, next_button_enabled=False, current_page_number=2, total_pages=2)
    self.notes_page.press_previous_page_button()
    self._verify_pagination_info(notes_count_on_current_page=25, header_text='Showing    1-25    out    of    26    total', previous_button_enabled=False, next_button_enabled=True, current_page_number=1, total_pages=2)
