diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-07-29 12:31:37 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-07-31 08:37:02 +0200 |
commit | 4c313725bee3687b6ced47522c47c08a614061fa (patch) | |
tree | f37782154532bc33b02c692ded7383dd34169610 /spec/support | |
parent | 67ffe3ced0a704d78f528e5dc8ea4243e5e4a47f (diff) | |
download | gitlab-ce-4c313725bee3687b6ced47522c47c08a614061fa.tar.gz |
Add edit_note helper methodadd-edit-note-helper-method-pd
Diffstat (limited to 'spec/support')
-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) |