diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-10-18 12:13:11 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-10-18 12:13:11 +0000 |
commit | a28a0c60d51e1d9eeb1b55f8f5c032f1d1fe4b51 (patch) | |
tree | cddc9bd0a32a077ddbf048fcfd5c8c8f8890bdcd /spec | |
parent | e4b465d746675238f65dea1c98bcf71e8e4b0805 (diff) | |
download | gitlab-ce-a28a0c60d51e1d9eeb1b55f8f5c032f1d1fe4b51.tar.gz |
Fix resolved discussions not expanding on side by side view
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_requests/diff_notes_resolve_spec.rb | 29 |
1 files changed, 24 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 475c8586f45..3db0729cafb 100644 --- a/spec/features/merge_requests/diff_notes_resolve_spec.rb +++ b/spec/features/merge_requests/diff_notes_resolve_spec.rb @@ -97,14 +97,33 @@ feature 'Diff notes resolve', :js do visit_merge_request end - it 'hides when resolve discussion is clicked' do - expect(page).to have_selector('.discussion-body', visible: false) + describe 'timeline view' do + it 'hides when resolve discussion is clicked' do + expect(page).to have_selector('.discussion-body', visible: false) + end + + 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 'shows resolved discussion when toggled' do - find(".timeline-content .discussion[data-discussion-id='#{note.discussion_id}'] .discussion-toggle-button").click + describe 'side-by-side view' do + before do + page.within('.merge-request-tabs') { click_link 'Changes' } + page.find('#parallel-diff-btn').click + end - expect(page.find(".timeline-content #note_#{note.noteable_id}")).to be_visible + it 'hides when resolve discussion is clicked' do + expect(page).to have_selector('.diffs .diff-file .notes_holder', visible: false) + end + + it 'shows resolved discussion when toggled' do + find('.diff-comment-avatar-holders').click + + expect(find('.diffs .diff-file .notes_holder')).to be_visible + end end end |