Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-07-21 04:12:52 +0300
committerRémy Coutable <remy@rymai.me>2016-07-21 12:16:33 +0300
commit45e666184297caed7b0b0adda02714e3e8f8383a (patch)
treed09874d131ca5d9cc2751b0608bc3ed66625d428
parentdab0c358584d8352ba010887d282c2f01f7afb03 (diff)
Merge branch 'remove-flaky-diff-note-tests' into 'master'
Remove flaky diff note tests for now These will be replaced with better, more exhaustive specs by @lbennett based on the conversation in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5262. See merge request !5379
-rw-r--r--spec/features/merge_requests/diffs_spec.rb94
1 files changed, 0 insertions, 94 deletions
diff --git a/spec/features/merge_requests/diffs_spec.rb b/spec/features/merge_requests/diffs_spec.rb
index 35f5bfe46be..c9a0059645d 100644
--- a/spec/features/merge_requests/diffs_spec.rb
+++ b/spec/features/merge_requests/diffs_spec.rb
@@ -22,98 +22,4 @@ feature 'Diffs URL', js: true, feature: true do
expect(page).to have_css('.diffs.tab-pane.active')
end
end
-
- context 'when hovering over the parallel view diff file' do
- let(:comment_button_class) { '.add-diff-note' }
-
- before(:each) do
- visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request
- click_link 'Side-by-side'
- @old_line_number = first '.diff-line-num.old_line:not(.empty-cell)'
- @new_line_number = first '.diff-line-num.new_line:not(.empty-cell)'
- @old_line = first '.line_content[data-line-type="old"]'
- @new_line = first '.line_content[data-line-type="new"]'
- end
-
- it 'shows a comment button on the old side when hovering over an old line number' do
- @old_line_number.hover
- expect(@old_line_number).to have_css comment_button_class
- expect(@new_line_number).not_to have_css comment_button_class
- end
-
- it 'shows a comment button on the old side when hovering over an old line' do
- @old_line.hover
- expect(@old_line_number).to have_css comment_button_class
- expect(@new_line_number).not_to have_css comment_button_class
- end
-
- it 'shows a comment button on the new side when hovering over a new line number' do
- @new_line_number.hover
- expect(@new_line_number).to have_css comment_button_class
- expect(@old_line_number).not_to have_css comment_button_class
- end
-
- it 'shows a comment button on the new side when hovering over a new line' do
- @new_line.hover
- expect(@new_line_number).to have_css comment_button_class
- expect(@old_line_number).not_to have_css comment_button_class
- end
- end
-
- context 'when hovering over the inline view diff file' do
- let(:comment_button_class) { '.add-diff-note' }
-
- before(:each) do
- visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request
- click_link 'Inline'
- @old_line_number = first '.diff-line-num.old_line:not(.unfold)'
- @new_line_number = first '.diff-line-num.new_line:not(.unfold)'
- @new_line = first '.line_content:not(.match)'
- end
-
- it 'shows a comment button on the old side when hovering over an old line number' do
- @old_line_number.hover
- expect(@old_line_number).to have_css comment_button_class
- expect(@new_line_number).not_to have_css comment_button_class
- end
-
- it 'shows a comment button on the new side when hovering over a new line number' do
- @new_line_number.hover
- expect(@old_line_number).to have_css comment_button_class
- expect(@new_line_number).not_to have_css comment_button_class
- end
-
- it 'shows a comment button on the new side when hovering over a new line' do
- @new_line.hover
- expect(@old_line_number).to have_css comment_button_class
- expect(@new_line_number).not_to have_css comment_button_class
- end
- end
-
- context 'when clicking a comment button' do
- let(:test_note_comment) { 'this is a test note!' }
- let(:note_class) { '.new-note' }
-
- before(:each) do
- visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request
- click_link 'Inline'
- first('.diff-line-num.old_line:not(.unfold)').hover
- find('.add-diff-note').click
- end
-
- it 'shows a note form' do
- expect(page).to have_css note_class
- end
-
- it 'can be submitted and viewed' do
- fill_in 'note[note]', with: :test_note_comment
- click_button 'Comment'
- expect(page).to have_content :test_note_comment
- end
-
- it 'can be closed' do
- find('.note-form-actions .btn-cancel').click
- expect(page).not_to have_css note_class
- end
- end
end