'Scenario: User can edit notes.
Given I have a course with 3 components with notes
And I open the unit with 2 annotatable components
When I change text in the notes
Then I see that notes were correctly changed
When I change sequential position to "2"
And I change the note on the page
Then I see that note was correctly changed
When I refresh the page
Then I see that edited note was correctly stored
When I change sequential position to "1"
Then I see that edited notes were correctly stored on the page'

def test_can_edit_notes(self):

    self._add_notes()
    self.note_unit_page.visit()
    components = self.note_unit_page.components
    self.edit_notes(components)
    self.assert_text_in_notes(self.note_unit_page.notes)
    self.courseware_page.go_to_sequential_position(2)
    components = self.note_unit_page.components
    self.edit_notes(components)
    self.assert_text_in_notes(self.note_unit_page.notes)
    components = self.note_unit_page.refresh()
    self.assert_text_in_notes(self.note_unit_page.notes)
    self.courseware_page.go_to_sequential_position(1)
    components = self.note_unit_page.components
    self.assert_text_in_notes(self.note_unit_page.notes)
