Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-07-31 13:30:51 +0300
committerThong Kuah <tkuah@gitlab.com>2019-07-31 13:30:51 +0300
commit533237a097281dbe4fb1c821d5823c4de8c8f6af (patch)
tree5f528dcf87219916d370d215a20af49d772f8be7
parentc2e66c1c561d88458b0f12257aab23b388f795e4 (diff)
parent4c313725bee3687b6ced47522c47c08a614061fa (diff)
Merge branch 'add-edit-note-helper-method-pd' into 'master'
Add edit_note helper method See merge request gitlab-org/gitlab-ce!31235
-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)