summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-07-29 12:31:37 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-07-31 08:37:02 +0200
commit4c313725bee3687b6ced47522c47c08a614061fa (patch)
treef37782154532bc33b02c692ded7383dd34169610
parent67ffe3ced0a704d78f528e5dc8ea4243e5e4a47f (diff)
downloadgitlab-ce-add-edit-note-helper-method-pd.tar.gz
Add edit_note helper methodadd-edit-note-helper-method-pd
-rw-r--r--spec/support/helpers/features/notes_helpers.rb8
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)