diff options
-rw-r--r-- | spec/support/helpers/features/notes_helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/helpers/features/notes_helpers.rb b/spec/support/helpers/features/notes_helpers.rb index a2d8d71b541..8c27f81930d 100644 --- a/spec/support/helpers/features/notes_helpers.rb +++ b/spec/support/helpers/features/notes_helpers.rb @@ -23,6 +23,14 @@ module Spec end end + def edit_note(note_text_to_edit, new_note_text) + page.within('#notes-list li.note', text: note_text_to_edit) do + find('.js-note-edit').click + fill_in('note[note]', with: new_note_text) + find('.js-comment-button').click + end + end + def preview_note(text) page.within('.js-main-target-form') do filled_text = fill_in('note[note]', with: text) |