Commit a8f0590f authored by Michel Engelen's avatar Michel Engelen Committed by Michel Engelen

updated test

parent e671ab06
require 'rails_helper'
describe 'Resolve an open discussion in a merge request by creating an issue', :js do
describe 'Resolve an open thread in a merge request by creating an issue', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, only_allow_merge_if_all_discussions_are_resolved: true) }
let(:merge_request) { create(:merge_request, source_project: project) }
......@@ -30,7 +30,7 @@ describe 'Resolve an open discussion in a merge request by creating an issue', :
end
end
context 'resolving the discussion' do
context 'resolving the thread' do
before do
click_button 'Resolve thread'
end
......@@ -39,7 +39,7 @@ describe 'Resolve an open discussion in a merge request by creating an issue', :
expect(page).not_to have_css resolve_discussion_selector
end
it 'shows the link for creating a new issue when unresolving a discussion' do
it 'shows the link for creating a new issue when unresolving a thread' do
page.within '.diff-content' do
click_button 'Unresolve thread'
end
......@@ -48,7 +48,7 @@ describe 'Resolve an open discussion in a merge request by creating an issue', :
end
end
it 'has a link to create a new issue for a discussion' do
it 'has a link to create a new issue for a thread' do
expect(page).to have_css resolve_discussion_selector
end
......@@ -57,13 +57,13 @@ describe 'Resolve an open discussion in a merge request by creating an issue', :
find(resolve_discussion_selector).click
end
it 'has a hidden field for the discussion' do
it 'has a hidden field for the thread' do
discussion_field = find('#discussion_to_resolve', visible: false)
expect(discussion_field.value).to eq(discussion.id.to_s)
end
it_behaves_like 'creating an issue for a discussion'
it_behaves_like 'creating an issue for a thread'
end
end
......@@ -75,8 +75,8 @@ describe 'Resolve an open discussion in a merge request by creating an issue', :
discussion_to_resolve: discussion.id)
end
it 'Shows a notice to ask someone else to resolve the discussions' do
expect(page).to have_content("The discussion at #{merge_request.to_reference}"\
it 'Shows a notice to ask someone else to resolve the threads' do
expect(page).to have_content("The thread at #{merge_request.to_reference}"\
" (discussion #{discussion.first_note.id}) will stay unresolved."\
" Ask someone with permission to resolve it.")
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment