diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-10-10 12:40:33 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-10-10 12:40:33 -0500 |
commit | 501d2df40ff0da4f37dc9bbedde900ae820c2d11 (patch) | |
tree | 2c61f1dd3cfc880c310efa56c16d27cc3b449bfb | |
parent | 9ac5338b8eb361927ad068486398b92acb0c287e (diff) | |
download | gitlab-ce-501d2df40ff0da4f37dc9bbedde900ae820c2d11.tar.gz |
Add explicit test to test resolved discussion toggle contentadd-resolve-discussion-test
-rw-r--r-- | spec/features/merge_requests/diff_notes_resolve_spec.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/spec/features/merge_requests/diff_notes_resolve_spec.rb b/spec/features/merge_requests/diff_notes_resolve_spec.rb index 637e6036384..475c8586f45 100644 --- a/spec/features/merge_requests/diff_notes_resolve_spec.rb +++ b/spec/features/merge_requests/diff_notes_resolve_spec.rb @@ -88,14 +88,24 @@ feature 'Diff notes resolve', :js do end end - it 'hides resolved discussion' do - page.within '.diff-content' do - click_button 'Resolve discussion' + describe 'resolved discussion' do + before do + page.within '.diff-content' do + click_button 'Resolve discussion' + end + + visit_merge_request end - visit_merge_request + it 'hides when resolve discussion is clicked' do + expect(page).to have_selector('.discussion-body', visible: false) + end - expect(page).to have_selector('.discussion-body', visible: false) + it 'shows resolved discussion when toggled' do + find(".timeline-content .discussion[data-discussion-id='#{note.discussion_id}'] .discussion-toggle-button").click + + expect(page.find(".timeline-content #note_#{note.noteable_id}")).to be_visible + end end it 'allows user to resolve from reply form without a comment' do |