summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luís <aluis@gitlab.com>2019-07-29 19:00:43 +0100
committerAndré Luís <aluis@gitlab.com>2019-07-29 19:00:43 +0100
commitf6c88d6fe22b573b55410ce69473dc1482b87486 (patch)
treea77ebecc59ac27c16e6d68716374654c999d30ea
parent896530983deb85bf4e56f340d5cacc2f242a3ae2 (diff)
downloadgitlab-ce-andr3-58035-expand-mr-diff.tar.gz
Uncommenting the previously commented testsandr3-58035-expand-mr-diff
-rw-r--r--spec/features/merge_request/user_posts_diff_notes_spec.rb62
-rw-r--r--spec/features/merge_request/user_views_diffs_spec.rb32
2 files changed, 47 insertions, 47 deletions
diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb
index b1ba24e0fa3..02f8de68967 100644
--- a/spec/features/merge_request/user_posts_diff_notes_spec.rb
+++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb
@@ -75,25 +75,25 @@ describe 'Merge request > User posts diff notes', :js do
end
end
- # context 'with an unfolded line' do
- # before do
- # find('.js-unfold', match: :first).click
- # wait_for_requests
- # end
-
- # # The first `.js-unfold` unfolds upwards, therefore the first
- # # `.line_holder` will be an unfolded line.
- # let(:line_holder) { first('#a5cc2925ca8258af241be7e5b0381edf30266302 .line_holder') }
-
- # it 'allows commenting on the left side' do
- # should_allow_commenting(line_holder, 'left')
- # end
-
- # it 'allows commenting on the right side' do
- # # Automatically shifts comment box to left side.
- # should_allow_commenting(line_holder, 'right')
- # end
- # end
+ context 'with an unfolded line' do
+ before do
+ find('.js-unfold', match: :first).click
+ wait_for_requests
+ end
+
+ # The first `.js-unfold` unfolds upwards, therefore the first
+ # `.line_holder` will be an unfolded line.
+ let(:line_holder) { first('#a5cc2925ca8258af241be7e5b0381edf30266302 .line_holder') }
+
+ it 'allows commenting on the left side' do
+ should_allow_commenting(line_holder, 'left')
+ end
+
+ it 'allows commenting on the right side' do
+ # Automatically shifts comment box to left side.
+ should_allow_commenting(line_holder, 'right')
+ end
+ end
end
context 'when hovering over an inline view diff file' do
@@ -138,20 +138,20 @@ describe 'Merge request > User posts diff notes', :js do
end
end
- # context 'with an unfolded line' do
- # before do
- # find('.js-unfold', match: :first).click
- # wait_for_requests
- # end
+ context 'with an unfolded line' do
+ before do
+ find('.js-unfold', match: :first).click
+ wait_for_requests
+ end
- # # The first `.js-unfold` unfolds upwards, therefore the first
- # # `.line_holder` will be an unfolded line.
- # let(:line_holder) { first('.line_holder[id="a5cc2925ca8258af241be7e5b0381edf30266302_1_1"]') }
+ # The first `.js-unfold` unfolds upwards, therefore the first
+ # `.line_holder` will be an unfolded line.
+ let(:line_holder) { first('.line_holder[id="a5cc2925ca8258af241be7e5b0381edf30266302_1_1"]') }
- # it 'allows commenting' do
- # should_allow_commenting line_holder
- # end
- # end
+ it 'allows commenting' do
+ should_allow_commenting line_holder
+ end
+ end
context 'when hovering over a diff discussion' do
before do
diff --git a/spec/features/merge_request/user_views_diffs_spec.rb b/spec/features/merge_request/user_views_diffs_spec.rb
index f2ec629490f..5022cefe8b2 100644
--- a/spec/features/merge_request/user_views_diffs_spec.rb
+++ b/spec/features/merge_request/user_views_diffs_spec.rb
@@ -14,13 +14,13 @@ describe 'User views diffs', :js do
find('.js-toggle-tree-list').click
end
- # shared_examples 'unfold diffs' do
- # it 'unfolds diffs' do
- # first('.js-unfold').click
+ shared_examples 'unfold diffs' do
+ it 'unfolds diffs' do
+ first('.js-unfold').click
- # expect(find('.file-holder[id="a5cc2925ca8258af241be7e5b0381edf30266302"] .text-file')).to have_content('.bundle')
- # end
- # end
+ expect(find('.file-holder[id="a5cc2925ca8258af241be7e5b0381edf30266302"] .text-file')).to have_content('.bundle')
+ end
+ end
it 'shows diffs' do
find('.js-show-diff-settings').click
@@ -34,19 +34,19 @@ describe 'User views diffs', :js do
expect(page).not_to have_selector('.mr-loading-status .loading', visible: true)
end
- # it 'expands all diffs' do
- # first('#a5cc2925ca8258af241be7e5b0381edf30266302 .js-file-title').click
+ it 'expands all diffs' do
+ first('#a5cc2925ca8258af241be7e5b0381edf30266302 .js-file-title').click
- # expect(page).to have_button('Expand all')
+ expect(page).to have_button('Expand all')
- # click_button 'Expand all'
+ click_button 'Expand all'
- # expect(page).not_to have_button('Expand all')
- # end
+ expect(page).not_to have_button('Expand all')
+ end
- # context 'when in the inline view' do
- # include_examples 'unfold diffs'
- # end
+ context 'when in the inline view' do
+ include_examples 'unfold diffs'
+ end
context 'when in the side-by-side view' do
before do
@@ -69,6 +69,6 @@ describe 'User views diffs', :js do
expect(page).to have_css('.content-wrapper > .container-fluid.container-limited')
end
- # include_examples 'unfold diffs'
+ include_examples 'unfold diffs'
end
end