summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-10-10 20:41:52 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-10-10 20:41:52 +0000
commit73488a9b061692b6d9e99e223ff82f39d9e17df1 (patch)
tree80893ce1b964de39fe5ac14187a1cb12d981a3ae
parent8ae7963cd027cd91d3d9a1fa635b7071c941f60f (diff)
parent501d2df40ff0da4f37dc9bbedde900ae820c2d11 (diff)
downloadgitlab-ce-73488a9b061692b6d9e99e223ff82f39d9e17df1.tar.gz
Merge branch 'add-resolve-discussion-test' into 'master'
Add explicit test to test resolved discussion toggle content See merge request gitlab-org/gitlab-ce!14796
-rw-r--r--spec/features/merge_requests/diff_notes_resolve_spec.rb20
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