From 4169421049e1909bddc49582f7ebd89bd504af00 Mon Sep 17 00:00:00 2001 From: Michel Engelen Date: Fri, 14 Jun 2019 11:18:03 +0200 Subject: updated tests for !29553 --- spec/features/merge_request/user_sees_discussions_spec.rb | 8 ++++---- ..._merge_button_depending_on_unresolved_discussions_spec.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'spec') diff --git a/spec/features/merge_request/user_sees_discussions_spec.rb b/spec/features/merge_request/user_sees_discussions_spec.rb index 57be1d06708..39258b48295 100644 --- a/spec/features/merge_request/user_sees_discussions_spec.rb +++ b/spec/features/merge_request/user_sees_discussions_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Merge request > User sees discussions', :js do +describe 'Merge request > User sees threads', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project) } @@ -30,7 +30,7 @@ describe 'Merge request > User sees discussions', :js do visit project_merge_request_path(project, merge_request) end - context 'active discussions' do + context 'active threads' do it 'shows a link to the diff' do within(".discussion[data-discussion-id='#{active_discussion.id}']") do path = diffs_project_merge_request_path(project, merge_request, anchor: active_discussion.line_code) @@ -39,7 +39,7 @@ describe 'Merge request > User sees discussions', :js do end end - context 'outdated discussions' do + context 'outdated threads' do it 'shows a link to the outdated diff' do within(".discussion[data-discussion-id='#{outdated_discussion.id}']") do path = diffs_project_merge_request_path(project, merge_request, diff_id: old_merge_request_diff.id, anchor: outdated_discussion.line_code) @@ -85,7 +85,7 @@ describe 'Merge request > User sees discussions', :js do it_behaves_like 'a functional discussion' it 'displays correct header' do - expect(page).to have_content "started a discussion on commit #{note.commit_id[0...7]}" + expect(page).to have_content "started a thread on commit #{note.commit_id[0...7]}" end end diff --git a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb index f6b771facf8..cf398a7df18 100644 --- a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb +++ b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'Merge request > User sees merge button depending on unresolved discussions', :js do +describe 'Merge request > User sees merge button depending on unresolved threads', :js do let(:project) { create(:project, :repository) } let(:user) { project.creator } let!(:merge_request) { create(:merge_request_with_diff_notes, source_project: project, author: user) } @@ -16,14 +16,14 @@ describe 'Merge request > User sees merge button depending on unresolved discuss visit project_merge_request_path(project, merge_request) end - context 'with unresolved discussions' do + context 'with unresolved threads' do it 'does not allow to merge' do expect(page).not_to have_button 'Merge' - expect(page).to have_content('There are unresolved discussions.') + expect(page).to have_content('There are unresolved threads.') end end - context 'with all discussions resolved' do + context 'with all threads resolved' do before do merge_request.discussions.each { |d| d.resolve!(user) } visit project_merge_request_path(project, merge_request) @@ -41,13 +41,13 @@ describe 'Merge request > User sees merge button depending on unresolved discuss visit project_merge_request_path(project, merge_request) end - context 'with unresolved discussions' do + context 'with unresolved threads' do it 'does not allow to merge' do expect(page).to have_button 'Merge' end end - context 'with all discussions resolved' do + context 'with all threads resolved' do before do merge_request.discussions.each { |d| d.resolve!(user) } visit project_merge_request_path(project, merge_request) -- cgit v1.2.1