diff options
author | Fatih Acet <acetfatih@gmail.com> | 2018-11-08 10:58:45 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-11-08 10:58:45 +0300 |
commit | cd5ddc4f2e3088a906417741a019292479ab84a6 (patch) | |
tree | d7deeb2234938180fda92f17ebcfad22611fd07f /spec/support/features | |
parent | b5a79f15369678fd959e6db290e2f29eab3ca84c (diff) |
Discussions redesign
Diffstat (limited to 'spec/support/features')
-rw-r--r-- | spec/support/features/discussion_comments_shared_example.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb index 80604395adf..18cf08f0b9e 100644 --- a/spec/support/features/discussion_comments_shared_example.rb +++ b/spec/support/features/discussion_comments_shared_example.rb @@ -150,17 +150,25 @@ shared_examples 'discussion comments' do |resource_name| end if resource_name == 'merge request' - let(:note_id) { find("#{comments_selector} .note", match: :first)['data-note-id'] } + let(:note_id) { find("#{comments_selector} .note:first-child", match: :first)['data-note-id'] } + let(:reply_id) { find("#{comments_selector} .note:last-child", match: :first)['data-note-id'] } it 'shows resolved discussion when toggled' do + find("#{comments_selector} .js-vue-discussion-reply").click + find("#{comments_selector} .note-textarea").send_keys('a') + + click_button "Comment" + wait_for_requests + click_button "Resolve discussion" + wait_for_requests expect(page).to have_selector(".note-row-#{note_id}", visible: true) refresh - click_button "Toggle discussion" + click_button "1 reply" - expect(page).to have_selector(".note-row-#{note_id}", visible: true) + expect(page).to have_selector(".note-row-#{reply_id}", visible: true) end end end |