Commit 9e608ed0 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ee-issue/55953' into 'master'

Backport from CE (issue #55953)

See merge request gitlab-org/gitlab-ee!14162
parents 5eabb74a fbdb819d
......@@ -32,15 +32,15 @@ const CommentAndResolveBtn = Vue.extend({
buttonText: function() {
if (this.isDiscussionResolved) {
if (this.textareaIsEmpty) {
return __('Unresolve discussion');
return __('Unresolve thread');
} else {
return __('Comment & unresolve discussion');
return __('Comment & unresolve thread');
}
} else {
if (this.textareaIsEmpty) {
return __('Resolve discussion');
return __('Resolve thread');
} else {
return __('Comment & resolve discussion');
return __('Comment & resolve thread');
}
}
},
......
......@@ -65,7 +65,7 @@ export default {
return this.getUserData.id;
},
commentButtonTitle() {
return this.noteType === constants.COMMENT ? 'Comment' : 'Start discussion';
return this.noteType === constants.COMMENT ? 'Comment' : 'Start thread';
},
startDiscussionDescription() {
let text = 'Discuss a specific suggestion or question';
......@@ -418,7 +418,7 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<i aria-hidden="true" class="fa fa-check icon"> </i>
<div class="description">
<strong>Start discussion</strong>
<strong>Start thread</strong>
<p>{{ startDiscussionDescription }}</p>
</div>
</button>
......
......@@ -61,7 +61,7 @@ export default {
</span>
<span class="line-resolve-text">
{{ resolvedDiscussionsCount }}/{{ resolvableDiscussionsCount }}
{{ n__('discussion resolved', 'discussions resolved', resolvableDiscussionsCount) }}
{{ n__('thread resolved', 'threads resolved', resolvableDiscussionsCount) }}
</span>
</div>
<div
......@@ -72,7 +72,7 @@ export default {
<a
v-gl-tooltip
:href="resolveAllDiscussionsIssuePath"
:title="s__('Resolve all discussions in new issue')"
:title="s__('Resolve all threads in new issue')"
class="new-issue-for-discussion btn btn-default discussion-create-issue-btn"
>
<icon name="issue-new" />
......@@ -81,7 +81,7 @@ export default {
<div v-if="isLoggedIn && !allResolved" class="btn-group btn-group-sm" role="group">
<button
v-gl-tooltip
title="Jump to first unresolved discussion"
title="Jump to first unresolved thread"
class="btn btn-default discussion-next-btn"
@click="jumpToFirstUnresolvedDiscussion"
>
......
......@@ -25,7 +25,7 @@ export default {
<gl-button
v-gl-tooltip
:href="url"
:title="s__('MergeRequests|Resolve this discussion in a new issue')"
:title="s__('MergeRequests|Resolve this thread in a new issue')"
class="new-issue-for-discussion discussion-create-issue-btn"
>
<icon name="issue-new" />
......
......@@ -283,11 +283,11 @@ export default {
type="checkbox"
class="qa-unresolve-review-discussion"
/>
{{ __('Unresolve discussion') }}
{{ __('Unresolve thread') }}
</template>
<template v-else>
<input v-model="isResolving" type="checkbox" class="qa-resolve-review-discussion" />
{{ __('Resolve discussion') }}
{{ __('Resolve thread') }}
</template>
</label>
</p>
......
......@@ -70,7 +70,7 @@ export default {
@click="handleToggle"
>
<i :class="toggleChevronClass" class="fa" aria-hidden="true"></i>
{{ __('Toggle discussion') }}
{{ __('Toggle thread') }}
</button>
</div>
<a
......
......@@ -174,22 +174,20 @@ export default {
active: isActive,
} = this.discussion;
let text = s__('MergeRequests|started a discussion');
let text = s__('MergeRequests|started a thread');
if (isForCommit) {
text = s__(
'MergeRequests|started a discussion on commit %{linkStart}%{commitId}%{linkEnd}',
);
text = s__('MergeRequests|started a thread on commit %{linkStart}%{commitId}%{linkEnd}');
} else if (isDiffDiscussion && commitId) {
text = isActive
? s__('MergeRequests|started a discussion on commit %{linkStart}%{commitId}%{linkEnd}')
? s__('MergeRequests|started a thread on commit %{linkStart}%{commitId}%{linkEnd}')
: s__(
'MergeRequests|started a discussion on an outdated change in commit %{linkStart}%{commitId}%{linkEnd}',
'MergeRequests|started a thread on an outdated change in commit %{linkStart}%{commitId}%{linkEnd}',
);
} else if (isDiffDiscussion) {
text = isActive
? s__('MergeRequests|started a discussion on %{linkStart}the diff%{linkEnd}')
? s__('MergeRequests|started a thread on %{linkStart}the diff%{linkEnd}')
: s__(
'MergeRequests|started a discussion on %{linkStart}an old version of the diff%{linkEnd}',
'MergeRequests|started a thread on %{linkStart}an old version of the diff%{linkEnd}',
);
}
......
......@@ -20,13 +20,13 @@ export default {
resolveButtonTitle() {
if (this.updatedNoteBody) {
if (this.discussionResolved) {
return __('Comment & unresolve discussion');
return __('Comment & unresolve thread');
}
return __('Comment & resolve discussion');
return __('Comment & resolve thread');
}
return this.discussionResolved ? __('Unresolve discussion') : __('Resolve discussion');
return this.discussionResolved ? __('Unresolve thread') : __('Resolve thread');
},
},
methods: {
......
......@@ -20,7 +20,7 @@ export default {
<status-icon :show-disabled-button="true" status="warning" />
<div class="media-body space-children">
<span class="bold">
{{ s__('mrWidget|There are unresolved discussions. Please resolve these discussions') }}
{{ s__('mrWidget|There are unresolved threads. Please resolve these threads') }}
</span>
<a
v-if="mr.createIssueToResolveDiscussionsPath"
......
......@@ -249,7 +249,7 @@ module SystemNoteService
end
def resolve_all_discussions(merge_request, project, author)
body = "resolved all discussions"
body = "resolved all threads"
create_note(NoteSummary.new(merge_request, project, author, body, action: 'discussion'))
end
......
......@@ -13,12 +13,12 @@
= icon("chevron-up")
- else
= icon("chevron-down")
= _('Toggle discussion')
= _('Toggle thread')
= link_to_member(@project, discussion.author, avatar: false)
.inline.discussion-headline-light
= discussion.author.to_reference
started a discussion
started a thread
- url = discussion_path(discussion)
- if discussion.for_commit? && @noteable != discussion.noteable
......
......@@ -4,7 +4,7 @@
.btn-group{ role: "group", "v-if" => "showButton" }
= link_to custom_icon('icon_mr_issue'),
new_project_issue_path(@project, merge_request_to_resolve_discussions_of: merge_request.iid, discussion_to_resolve: discussion.id),
title: 'Resolve this discussion in a new issue',
aria: { label: 'Resolve this discussion in a new issue' },
title: 'Resolve this thread in a new issue',
aria: { label: 'Resolve this thread in a new issue' },
data: { container: 'body' },
class: 'new-issue-for-discussion btn btn-default discussion-create-issue-btn has-tooltip'
......@@ -48,13 +48,13 @@
= hidden_field_tag 'merge_request_to_resolve_discussions_of', @merge_request_to_resolve_discussions_of.iid
- if @discussion_to_resolve
= hidden_field_tag 'discussion_to_resolve', @discussion_to_resolve.id
Creating this issue will resolve the discussion in
Creating this issue will resolve the thread in
- else
Creating this issue will resolve all discussions in
Creating this issue will resolve all threads in
= link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve)
- else
The
= @discussion_to_resolve ? 'discussion' : 'discussions'
= @discussion_to_resolve ? 'thread' : 'threads'
at
= link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve)
will stay unresolved. Ask someone with permission to resolve
......
......@@ -18,11 +18,11 @@
%li.divider.droplab-item-ignore
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => _('Start discussion'), 'close-text' => _("Start discussion & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Start discussion & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => _('Start thread'), 'close-text' => _("Start thread & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Start thread & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
%button.btn.btn-transparent
= icon('check', class: 'icon')
.description
%strong= _("Start discussion")
%strong= _("Start thread")
%p
= succeed '.' do
- if @note.noteable.supports_resolvable_notes?
......
---
title: "renamed discussion to thread in merge-request and issue timeline"
merge_request: 29553
author: Michel Engelen
type: changed
......@@ -39,7 +39,7 @@ export default {
return file.file_path;
}
return sprintf(__("%{authorsName}'s discussion"), {
return sprintf(__("%{authorsName}'s thread"), {
authorsName: this.discussion.notes.find(note => !note.system).author.name,
});
},
......
......@@ -36,14 +36,14 @@ export default {
if (discussionToBeResolved) {
if (discussionResolved) {
message = s__('MergeRequests|Discussion stays resolved');
message = s__('MergeRequests|Thread stays resolved');
} else {
message = s__('MergeRequests|Discussion will be resolved');
message = s__('MergeRequests|Thread will be resolved');
}
} else if (discussionResolved) {
message = s__('MergeRequests|Discussion will be unresolved');
message = s__('MergeRequests|Thread will be unresolved');
} else if (this.$options.showStaysResolved) {
message = s__('MergeRequests|Discussion stays unresolved');
message = s__('MergeRequests|Thread stays unresolved');
}
return message;
......
......@@ -21,7 +21,7 @@ export const addDraftToDiscussion = ({ commit }, { endpoint, data }) =>
return res;
})
.catch(() => {
flash(__('An error occurred adding a draft to the discussion.'));
flash(__('An error occurred adding a draft to the thread.'));
});
export const createNewDraft = ({ commit }, { endpoint, data }) =>
......
......@@ -60,7 +60,7 @@ export default {
return resolveStatus;
},
handleAddToReview() {
// check if draft should resolve discussion
// check if draft should resolve thread
const shouldResolve =
(this.discussionResolved && !this.isUnresolving) ||
(!this.discussionResolved && this.isResolving);
......
......@@ -12,14 +12,14 @@ module DraftNotes
def execute
if in_reply_to_discussion_id.present?
unless discussion
return base_error('Discussion to reply to cannot be found')
return base_error('Thread to reply to cannot be found')
end
params[:discussion_id] = discussion.reply_id
end
if params[:resolve_discussion] && !can_resolve_discussion?
return base_error('User is not allowed to resolve discussion')
return base_error('User is not allowed to resolve thread')
end
draft_note = DraftNote.new(params)
......
......@@ -90,7 +90,7 @@ describe Projects::MergeRequests::DraftsController do
expect(json_response['references']['users']).to include(user2.username)
end
context 'in a discussion' do
context 'in a thread' do
let(:discussion) { create(:discussion_note_on_merge_request, noteable: merge_request, project: project).discussion }
it 'creates draft note as a reply' do
......@@ -104,7 +104,7 @@ describe Projects::MergeRequests::DraftsController do
expect(draft_note.discussion_id).to eq(discussion.reply_id)
end
it 'creates a draft note that will resolve a discussion' do
it 'creates a draft note that will resolve a thread' do
expect do
create_draft_note(
overrides: { in_reply_to_discussion_id: discussion.reply_id },
......@@ -119,7 +119,7 @@ describe Projects::MergeRequests::DraftsController do
expect(draft_note.resolve_discussion).to eq(true)
end
it 'cannot create more than one draft note per discussion' do
it 'cannot create more than one draft note per thread' do
expect do
create_draft_note(
overrides: { in_reply_to_discussion_id: discussion.reply_id },
......@@ -283,7 +283,7 @@ describe Projects::MergeRequests::DraftsController do
.and change { DraftNote.count }.by(-1)
end
context 'when publishing drafts in a discussion' do
context 'when publishing drafts in a thread' do
let(:note) { create(:discussion_note_on_merge_request, noteable: merge_request, project: project) }
def create_reply(discussion_id, resolves: false)
......@@ -295,7 +295,7 @@ describe Projects::MergeRequests::DraftsController do
)
end
it 'resolves a discussion if the draft note resolves it' do
it 'resolves a thread if the draft note resolves it' do
draft_reply = create_reply(note.discussion_id, resolves: true)
post :publish, params: params
......@@ -307,7 +307,7 @@ describe Projects::MergeRequests::DraftsController do
expect(discussion.resolved_by.id).to eq(user.id)
end
it 'unresolves a discussion if the draft note unresolves it' do
it 'unresolves a thread if the draft note unresolves it' do
note.discussion.resolve!(user)
expect(note.discussion.resolved?).to eq(true)
......
require 'spec_helper'
describe 'Discussion Comments Epic', :js do
describe 'Thread Comments Epic', :js do
let(:user) { create(:user) }
let(:epic) { create(:epic) }
......@@ -12,5 +12,5 @@ describe 'Discussion Comments Epic', :js do
visit group_epic_path(epic.group, epic)
end
it_behaves_like 'discussion comments', 'epic'
it_behaves_like 'thread comments', 'epic'
end
......@@ -54,7 +54,7 @@ describe 'Epic show', :js do
end
end
it 'shows epic discussion filter dropdown' do
it 'shows epic thread filter dropdown' do
page.within('.js-epic-tabs-container') do
expect(find('.js-discussion-filter-container #discussion-filter-dropdown')).to have_content('Show all activity')
end
......@@ -97,7 +97,7 @@ describe 'Epic show', :js do
end
end
it 'does not show discussion filter dropdown' do
it 'does not show thread filter dropdown' do
expect(find('.js-epic-tabs-container')).to have_selector('.js-discussion-filter-container', visible: false)
end
......
......@@ -137,25 +137,25 @@ describe 'Merge request > Batch comments', :js do
end
end
context 'discussion is unresolved' do
context 'thread is unresolved' do
let!(:active_discussion) { create(:diff_note_on_merge_request, noteable: merge_request, project: project).to_discussion }
before do
visit_diffs
end
it 'publishes comment right away and resolves the discussion' do
it 'publishes comment right away and resolves the thread' do
expect(active_discussion.resolved?).to eq(false)
write_reply_to_discussion(button_text: 'Add comment now', resolve: true)
page.within '.line-resolve-all-container' do
expect(page).to have_content('1/1 discussion resolved')
expect(page).to have_content('1/1 thread resolved')
expect(page).to have_selector('.line-resolve-btn.is-active')
end
end
it 'publishes review and resolves the discussion' do
it 'publishes review and resolves the thread' do
expect(active_discussion.resolved?).to eq(false)
write_reply_to_discussion(resolve: true)
......@@ -168,7 +168,7 @@ describe 'Merge request > Batch comments', :js do
wait_for_requests
page.within '.line-resolve-all-container' do
expect(page).to have_content('1/1 discussion resolved')
expect(page).to have_content('1/1 thread resolved')
expect(page).to have_selector('.line-resolve-btn.is-active')
end
......@@ -176,7 +176,7 @@ describe 'Merge request > Batch comments', :js do
end
end
context 'discussion is resolved' do
context 'thread is resolved' do
let!(:active_discussion) { create(:diff_note_on_merge_request, :resolved, noteable: merge_request, project: project).to_discussion }
before do
......@@ -187,18 +187,18 @@ describe 'Merge request > Batch comments', :js do
page.find('.js-diff-comment-avatar').click
end
it 'publishes comment right away and unresolves the discussion' do
it 'publishes comment right away and unresolves the thread' do
expect(active_discussion.resolved?).to eq(true)
write_reply_to_discussion(button_text: 'Add comment now', unresolve: true)
page.within '.line-resolve-all-container' do
expect(page).to have_content('0/1 discussion resolved')
expect(page).to have_content('0/1 thread resolved')
expect(page).to have_selector('.line-resolve-btn.is-disabled')
end
end
it 'publishes review and unresolves the discussion' do
it 'publishes review and unresolves the thread' do
expect(active_discussion.resolved?).to eq(true)
wait_for_requests
......@@ -213,7 +213,7 @@ describe 'Merge request > Batch comments', :js do
wait_for_requests
page.within '.line-resolve-all-container' do
expect(page).to have_content('0/1 discussion resolved')
expect(page).to have_content('0/1 thread resolved')
expect(page).to have_selector('.line-resolve-btn.is-disabled')
end
......@@ -259,11 +259,11 @@ def write_reply_to_discussion(button_text: 'Start a review', text: 'Line is wron
fill_in('note_note', with: text)
if resolve
page.check('Resolve discussion')
page.check('Resolve thread')
end
if unresolve
page.check('Unresolve discussion')
page.check('Unresolve thread')
end
click_button(button_text)
......
......@@ -80,7 +80,7 @@ xdescribe 'Merge request > User approves', :js do
end
end
context 'when merge when discussions resolved is active' do
context 'when merge when threads resolved is active' do
let(:project) do
create(:project, :repository,
approvals_before_merge: 1,
......
......@@ -9,7 +9,7 @@ describe 'Merge request > User sees approval widget', :js do
sign_in(user)
end
context 'when merge when discussions resolved is active' do
context 'when merge when threads resolved is active' do
let(:project) do
create(:project, :repository,
approvals_before_merge: 1,
......
......@@ -99,7 +99,7 @@ describe('Batch comments draft preview item component', () => {
});
});
describe('for discussion', () => {
describe('for thread', () => {
beforeEach(() => {
createComponent(false, { discussion_id: '1', resolve_discussion: true }, store => {
store.state.notes.discussions.push({
......@@ -117,13 +117,13 @@ describe('Batch comments draft preview item component', () => {
it('renders title', () => {
expect(vm.$el.querySelector('.review-preview-item-header-text').textContent).toContain(
"Author Name's discussion",
"Author Name's thread",
);
});
it('it renders discussion resolved text', () => {
it('it renders thread resolved text', () => {
expect(vm.$el.querySelector('.draft-note-resolution').textContent).toContain(
'Discussion will be resolved',
'Thread will be resolved',
);
});
});
......
......@@ -52,9 +52,7 @@ describe('noteActions', () => {
const resolveButton = wrapper.find({ ref: 'resolveButton' });
expect(resolveButton.exists()).toBe(true);
expect(resolveButton.attributes('data-original-title')).toEqual(
'Discussion stays unresolved',
);
expect(resolveButton.attributes('data-original-title')).toEqual('Thread stays unresolved');
});
});
});
......@@ -23,11 +23,11 @@ describe DraftNotes::CreateService do
it 'cannot resolve when there is nothing to resolve' do
draft = create_draft(note: 'Not a reply!', resolve_discussion: true)
expect(draft.errors[:base]).to include('User is not allowed to resolve discussion')
expect(draft.errors[:base]).to include('User is not allowed to resolve thread')
expect(draft).not_to be_persisted
end
context 'in a discussion' do
context 'in a thread' do
it 'creates a draft note with discussion_id' do
discussion = create(:discussion_note_on_merge_request, noteable: merge_request, project: project).discussion
......@@ -38,7 +38,7 @@ describe DraftNotes::CreateService do
expect(draft.resolve_discussion).to be_falsey
end
it 'creates a draft that resolves the discussion' do
it 'creates a draft that resolves the thread' do
discussion = create(:discussion_note_on_merge_request, noteable: merge_request, project: project).discussion
draft = create_draft(note: 'A reply!', in_reply_to_discussion_id: discussion.reply_id, resolve_discussion: true)
......
......@@ -189,17 +189,17 @@ describe DraftNotes::PublishService do
end
end
context 'with drafts that resolve discussions' do
context 'with drafts that resolve threads' do
let!(:note) { create(:discussion_note_on_merge_request, noteable: merge_request, project: project) }
let!(:draft_note) { create(:draft_note, merge_request: merge_request, author: user, resolve_discussion: true, discussion_id: note.discussion.reply_id) }
it 'resolves the discussion' do
it 'resolves the thread' do
publish(draft: draft_note)
expect(note.discussion.resolved?).to be true
end
it 'sends notifications if all discussions are resolved' do
it 'sends notifications if all threads are resolved' do
expect_any_instance_of(MergeRequests::ResolvedDiscussionNotificationService).to receive(:execute).with(merge_request)
publish
......
......@@ -21,7 +21,7 @@ describe Issues::BuildService do
end
end
context 'for a single discussion' do
context 'for a single thread' do
describe '#execute' do
let(:merge_request) { create(:merge_request, title: "Hello world", source_project: project) }
let(:discussion) { create(:diff_note_on_merge_request, project: project, noteable: merge_request, note: "Almost done").to_discussion }
......@@ -30,7 +30,7 @@ describe Issues::BuildService do
context 'with an issue template' do
let(:project) { create(:project, :repository, issues_template: 'Work hard, play hard!') }
it 'picks the discussion description over the issue template' do
it 'picks the thread description over the issue template' do
issue = service.execute
expect(issue.description).to include('Almost done')
......
......@@ -146,7 +146,7 @@ msgstr[1] ""
msgid "%{actionText} & %{openOrClose} %{noteable}"
msgstr ""
msgid "%{authorsName}'s discussion"
msgid "%{authorsName}'s thread"
msgstr ""
msgid "%{commit_author_link} authored %{commit_timeago}"
......@@ -1165,7 +1165,7 @@ msgstr ""
msgid "An error has occurred"
msgstr ""
msgid "An error occurred adding a draft to the discussion."
msgid "An error occurred adding a draft to the thread."
msgstr ""
msgid "An error occurred adding a new draft."
......@@ -3408,10 +3408,10 @@ msgstr ""
msgid "Comment & reopen %{noteable_name}"
msgstr ""
msgid "Comment & resolve discussion"
msgid "Comment & resolve thread"
msgstr ""
msgid "Comment & unresolve discussion"
msgid "Comment & unresolve thread"
msgstr ""
msgid "Comment form position"
......@@ -8435,34 +8435,34 @@ msgstr ""
msgid "MergeRequests|An error occurred while saving the draft comment."
msgstr ""
msgid "MergeRequests|Discussion stays resolved"
msgid "MergeRequests|Failed to squash. Should be done manually."
msgstr ""
msgid "MergeRequests|Discussion stays unresolved"
msgid "MergeRequests|Jump to next unresolved discussion"
msgstr ""
msgid "MergeRequests|Discussion will be resolved"
msgid "MergeRequests|Reply..."
msgstr ""
msgid "MergeRequests|Discussion will be unresolved"
msgid "MergeRequests|Resolve this thread in a new issue"
msgstr ""
msgid "MergeRequests|Failed to squash. Should be done manually."
msgid "MergeRequests|Saving the comment failed"
msgstr ""
msgid "MergeRequests|Jump to next unresolved discussion"
msgid "MergeRequests|Squash task canceled: another squash is already in progress."
msgstr ""
msgid "MergeRequests|Reply..."
msgid "MergeRequests|Thread stays resolved"
msgstr ""
msgid "MergeRequests|Resolve this discussion in a new issue"
msgid "MergeRequests|Thread stays unresolved"
msgstr ""
msgid "MergeRequests|Saving the comment failed"
msgid "MergeRequests|Thread will be resolved"
msgstr ""
msgid "MergeRequests|Squash task canceled: another squash is already in progress."
msgid "MergeRequests|Thread will be unresolved"
msgstr ""
msgid "MergeRequests|Toggle comments for this file"
......@@ -8477,19 +8477,19 @@ msgstr ""
msgid "MergeRequests|commented on commit %{commitLink}"
msgstr ""
msgid "MergeRequests|started a discussion"
msgid "MergeRequests|started a thread"
msgstr ""
msgid "MergeRequests|started a discussion on %{linkStart}an old version of the diff%{linkEnd}"
msgid "MergeRequests|started a thread on %{linkStart}an old version of the diff%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion on %{linkStart}the diff%{linkEnd}"
msgid "MergeRequests|started a thread on %{linkStart}the diff%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion on an outdated change in commit %{linkStart}%{commitId}%{linkEnd}"
msgid "MergeRequests|started a thread on an outdated change in commit %{linkStart}%{commitId}%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion on commit %{linkStart}%{commitId}%{linkEnd}"
msgid "MergeRequests|started a thread on commit %{linkStart}%{commitId}%{linkEnd}"
msgstr ""
msgid "MergeRequest| %{paragraphStart}changed the description %{descriptionChangedTimes} times %{timeDifferenceMinutes}%{paragraphEnd}"
......@@ -11550,7 +11550,7 @@ msgstr ""
msgid "Resetting the authorization key will invalidate the previous key. Existing alert configurations will need to be updated with the new key."
msgstr ""
msgid "Resolve all discussions in new issue"
msgid "Resolve all threads in new issue"
msgstr ""
msgid "Resolve conflicts on source branch"
......@@ -11559,6 +11559,9 @@ msgstr ""
msgid "Resolve discussion"
msgstr ""
msgid "Resolve thread"
msgstr ""
msgid "Resolved"
msgstr ""
......@@ -12901,22 +12904,22 @@ msgstr ""
msgid "Start date"
msgstr ""
msgid "Start discussion"
msgid "Start merge train"
msgstr ""
msgid "Start discussion & close %{noteable_name}"
msgid "Start merge train when pipeline succeeds"
msgstr ""
msgid "Start discussion & reopen %{noteable_name}"
msgid "Start the Runner!"
msgstr ""
msgid "Start merge train"
msgid "Start thread"
msgstr ""
msgid "Start merge train when pipeline succeeds"
msgid "Start thread & close %{noteable_name}"
msgstr ""
msgid "Start the Runner!"
msgid "Start thread & reopen %{noteable_name}"
msgstr ""
msgid "Start your trial"
......@@ -14416,9 +14419,6 @@ msgstr ""
msgid "Toggle commit list"
msgstr ""
msgid "Toggle discussion"
msgstr ""
msgid "Toggle emoji award"
msgstr ""
......@@ -14431,6 +14431,9 @@ msgstr ""
msgid "Toggle sidebar"
msgstr ""
msgid "Toggle thread"
msgstr ""
msgid "ToggleButton|Toggle Status: OFF"
msgstr ""
......@@ -14695,6 +14698,9 @@ msgstr ""
msgid "Unresolve discussion"
msgstr ""
msgid "Unresolve thread"
msgstr ""
msgid "Unschedule job"
msgstr ""
......@@ -16574,11 +16580,6 @@ msgstr ""
msgid "disabled"
msgstr ""
msgid "discussion resolved"
msgid_plural "discussions resolved"
msgstr[0] ""
msgstr[1] ""
msgid "done"
msgstr ""
......@@ -16960,7 +16961,7 @@ msgstr ""
msgid "mrWidget|There are merge conflicts"
msgstr ""
msgid "mrWidget|There are unresolved discussions. Please resolve these discussions"
msgid "mrWidget|There are unresolved threads. Please resolve these threads"
msgstr ""
msgid "mrWidget|This feature merges changes from the target branch to the source branch. You cannot use this feature since the source branch is protected."
......@@ -17177,6 +17178,11 @@ msgstr ""
msgid "this document"
msgstr ""
msgid "thread resolved"
msgid_plural "threads resolved"
msgstr[0] ""
msgstr[1] ""
msgid "to help your contributors communicate effectively!"
msgstr ""
......
require 'spec_helper'
describe 'Discussion Comments Commit', :js do
describe 'Thread Comments Commit', :js do
include RepoHelpers
let(:user) { create(:user) }
......@@ -16,7 +16,7 @@ describe 'Discussion Comments Commit', :js do
visit project_commit_path(project, sample_commit.id)
end
it_behaves_like 'discussion comments', 'commit'
it_behaves_like 'thread comments', 'commit'
it 'has class .js-note-emoji' do
expect(page).to have_css('.js-note-emoji')
......
require 'spec_helper'
describe 'Discussion Comments Issue', :js do
describe 'Thread Comments Issue', :js do
let(:user) { create(:user) }
let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
......@@ -12,5 +12,5 @@ describe 'Discussion Comments Issue', :js do
visit project_issue_path(project, issue)
end
it_behaves_like 'discussion comments', 'issue'
it_behaves_like 'thread comments', 'issue'
end
require 'spec_helper'
describe 'Discussion Comments Merge Request', :js do
describe 'Thread Comments Merge Request', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) }
......@@ -12,5 +12,5 @@ describe 'Discussion Comments Merge Request', :js do
visit project_merge_request_path(project, merge_request)
end
it_behaves_like 'discussion comments', 'merge request'
it_behaves_like 'thread comments', 'merge request'
end
require 'spec_helper'
describe 'Discussion Comments Snippet', :js do
describe 'Thread Comments Snippet', :js do
let(:user) { create(:user) }
let(:project) { create(:project) }
let(:snippet) { create(:project_snippet, :private, project: project, author: user) }
......@@ -12,5 +12,5 @@ describe 'Discussion Comments Snippet', :js do
visit project_snippet_path(project, snippet)
end
it_behaves_like 'discussion comments', 'snippet'
it_behaves_like 'thread comments', 'snippet'
end
require 'rails_helper'
describe 'Resolving all open discussions in a merge request from an issue', :js do
describe 'Resolving all open threads in a merge request from an issue', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) }
let!(:discussion) { create(:diff_note_on_merge_request, noteable: merge_request, project: project).to_discussion }
def resolve_all_discussions_link_selector
text = "Resolve all discussions in new issue"
text = "Resolve all threads in new issue"
url = new_project_issue_path(project, merge_request_to_resolve_discussions_of: merge_request.iid)
%Q{a[data-original-title="#{text}"][href="#{url}"]}
end
......@@ -19,15 +19,15 @@ describe 'Resolving all open discussions in a merge request from an issue', :js
visit project_merge_request_path(project, merge_request)
end
it 'shows a button to resolve all discussions by creating a new issue' do
it 'shows a button to resolve all threads by creating a new issue' do
within('.line-resolve-all-container') do
expect(page).to have_selector resolve_all_discussions_link_selector
end
end
context 'resolving the discussion' do
context 'resolving the thread' do
before do
click_button 'Resolve discussion'
click_button 'Resolve thread'
end
it 'hides the link for creating a new issue' do
......@@ -35,15 +35,15 @@ describe 'Resolving all open discussions in a merge request from an issue', :js
end
end
context 'creating an issue for discussions' do
context 'creating an issue for threads' do
before do
find(resolve_all_discussions_link_selector).click
end
it_behaves_like 'creating an issue for a discussion'
it_behaves_like 'creating an issue for a thread'
end
context 'for a project where all discussions need to be resolved before merging' do
context 'for a project where all threads need to be resolved before merging' do
before do
project.update_attribute(:only_allow_merge_if_all_discussions_are_resolved, true)
end
......@@ -59,27 +59,27 @@ describe 'Resolving all open discussions in a merge request from an issue', :js
end
end
context 'merge request has discussions that need to be resolved' do
context 'merge request has threads that need to be resolved' do
before do
visit project_merge_request_path(project, merge_request)
end
it 'shows a warning that the merge request contains unresolved discussions' do
expect(page).to have_content 'There are unresolved discussions.'
it 'shows a warning that the merge request contains unresolved threads' do
expect(page).to have_content 'There are unresolved threads.'
end
it 'has a link to resolve all discussions by creating an issue' do
it 'has a link to resolve all threads by creating an issue' do
page.within '.mr-widget-body' do
expect(page).to have_link 'Create an issue to resolve them later', href: new_project_issue_path(project, merge_request_to_resolve_discussions_of: merge_request.iid)
end
end
context 'creating an issue for discussions' do
context 'creating an issue for threads' do
before do
page.click_link 'Create an issue to resolve them later', href: new_project_issue_path(project, merge_request_to_resolve_discussions_of: merge_request.iid)
end
it_behaves_like 'creating an issue for a discussion'
it_behaves_like 'creating an issue for a thread'
end
end
end
......@@ -92,8 +92,8 @@ describe 'Resolving all open discussions in a merge request from an issue', :js
visit new_project_issue_path(project, merge_request_to_resolve_discussions_of: merge_request.iid)
end
it 'Shows a notice to ask someone else to resolve the discussions' do
expect(page).to have_content("The discussions at #{merge_request.to_reference} will stay unresolved. Ask someone with permission to resolve them.")
it 'Shows a notice to ask someone else to resolve the threads' do
expect(page).to have_content("The threads at #{merge_request.to_reference} will stay unresolved. Ask someone with permission to resolve them.")
end
end
end
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) }
let!(:discussion) { create(:diff_note_on_merge_request, noteable: merge_request, project: project).to_discussion }
def resolve_discussion_selector
title = 'Resolve this discussion in a new issue'
title = 'Resolve this thread in a new issue'
url = new_project_issue_path(project, discussion_to_resolve: discussion.id, merge_request_to_resolve_discussions_of: merge_request.iid)
"a[data-original-title=\"#{title}\"][href=\"#{url}\"]"
end
......@@ -30,25 +30,25 @@ 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 discussion'
click_button 'Resolve thread'
end
it 'hides the link for creating a new issue' do
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 discussion'
click_button 'Unresolve thread'
end
expect(page).to have_css resolve_discussion_selector
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, match: :first).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
......
......@@ -37,7 +37,7 @@ describe 'User comments on a merge request', :js do
wait_for_requests
page.within('.notes .discussion') do
expect(page).to have_content("#{user.name} #{user.to_reference} started a discussion")
expect(page).to have_content("#{user.name} #{user.to_reference} started a thread")
expect(page).to have_content(sample_commit.line_code_path)
expect(page).to have_content('Line is wrong')
end
......
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
......
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)
......
......@@ -186,12 +186,12 @@ describe 'User comments on a diff', :js do
it 'resolves discussion when applied' do
page.within('.diff-discussions') do
expect(page).not_to have_content('Unresolve discussion')
expect(page).not_to have_content('Unresolve thread')
click_button('Apply suggestion')
wait_for_requests
expect(page).to have_content('Unresolve discussion')
expect(page).to have_content('Unresolve thread')
end
end
end
......
......@@ -45,11 +45,11 @@ describe('noteable_discussion component', () => {
expect(wrapper.find('.user-avatar-link').exists()).toBe(true);
});
it('should not render discussion header for non diff discussions', () => {
it('should not render thread header for non diff threads', () => {
expect(wrapper.find('.discussion-header').exists()).toBe(false);
});
it('should render discussion header', done => {
it('should render thread header', done => {
const discussion = { ...discussionMock };
discussion.diff_file = mockDiffFile;
discussion.diff_discussion = true;
......@@ -96,16 +96,16 @@ describe('noteable_discussion component', () => {
.catch(done.fail);
});
it('does not render jump to discussion button', () => {
expect(
wrapper.find('*[data-original-title="Jump to next unresolved discussion"]').exists(),
).toBe(false);
it('does not render jump to thread button', () => {
expect(wrapper.find('*[data-original-title="Jump to next unresolved thread"]').exists()).toBe(
false,
);
});
});
describe('methods', () => {
describe('jumpToNextDiscussion', () => {
it('expands next unresolved discussion', done => {
it('expands next unresolved thread', done => {
const discussion2 = getJSONFixture(discussionWithTwoUnresolvedNotes)[0];
discussion2.resolved = false;
discussion2.active = true;
......@@ -120,9 +120,7 @@ describe('noteable_discussion component', () => {
const nextDiscussionId = discussion2.id;
setFixtures(`
<div class="discussion" data-discussion-id="${nextDiscussionId}"></div>
`);
setFixtures(`<div class="discussion" data-discussion-id="${nextDiscussionId}"></div>`);
wrapper.vm.jumpToNextDiscussion();
......@@ -168,20 +166,20 @@ describe('noteable_discussion component', () => {
.catch(done.fail);
});
describe('for commit discussions', () => {
it('should display a monospace started a discussion on commit', () => {
expect(wrapper.text()).toContain(`started a discussion on commit ${truncatedCommitId}`);
describe('for commit threads', () => {
it('should display a monospace started a thread on commit', () => {
expect(wrapper.text()).toContain(`started a thread on commit ${truncatedCommitId}`);
expect(commitElement.exists()).toBe(true);
expect(commitElement.text()).toContain(truncatedCommitId);
});
});
describe('for diff discussion with a commit id', () => {
it('should display started discussion on commit header', done => {
describe('for diff thread with a commit id', () => {
it('should display started thread on commit header', done => {
wrapper.vm.discussion.for_commit = false;
wrapper.vm.$nextTick(() => {
expect(wrapper.text()).toContain(`started a discussion on commit ${truncatedCommitId}`);
expect(wrapper.text()).toContain(`started a thread on commit ${truncatedCommitId}`);
expect(commitElement).not.toBe(null);
......@@ -195,7 +193,7 @@ describe('noteable_discussion component', () => {
wrapper.vm.$nextTick(() => {
expect(wrapper.text()).toContain(
`started a discussion on an outdated change in commit ${truncatedCommitId}`,
`started a thread on an outdated change in commit ${truncatedCommitId}`,
);
expect(commitElement).not.toBe(null);
......@@ -205,21 +203,21 @@ describe('noteable_discussion component', () => {
});
});
describe('for diff discussions without a commit id', () => {
it('should show started a discussion on the diff text', done => {
describe('for diff threads without a commit id', () => {
it('should show started a thread on the diff text', done => {
Object.assign(wrapper.vm.discussion, {
for_commit: false,
commit_id: null,
});
wrapper.vm.$nextTick(() => {
expect(wrapper.text()).toContain('started a discussion on the diff');
expect(wrapper.text()).toContain('started a thread on the diff');
done();
});
});
it('should show discussion on older version text', done => {
it('should show thread on older version text', done => {
Object.assign(wrapper.vm.discussion, {
for_commit: false,
commit_id: null,
......@@ -227,7 +225,7 @@ describe('noteable_discussion component', () => {
});
wrapper.vm.$nextTick(() => {
expect(wrapper.text()).toContain('started a discussion on an old version of the diff');
expect(wrapper.text()).toContain('started a thread on an old version of the diff');
done();
});
......@@ -235,7 +233,7 @@ describe('noteable_discussion component', () => {
});
});
describe('for resolved discussion', () => {
describe('for resolved thread', () => {
beforeEach(() => {
const discussion = getJSONFixture(discussionWithTwoUnresolvedNotes)[0];
wrapper.setProps({ discussion });
......@@ -248,7 +246,7 @@ describe('noteable_discussion component', () => {
});
});
describe('for unresolved discussion', () => {
describe('for unresolved thread', () => {
beforeEach(done => {
const discussion = {
...getJSONFixture(discussionWithTwoUnresolvedNotes)[0],
......
......@@ -10,7 +10,7 @@ describe('UnresolvedDiscussions', () => {
vm.$destroy();
});
describe('with discussions path', () => {
describe('with threads path', () => {
beforeEach(() => {
vm = mountComponent(Component, {
mr: {
......@@ -21,7 +21,7 @@ describe('UnresolvedDiscussions', () => {
it('should have correct elements', () => {
expect(vm.$el.innerText).toContain(
'There are unresolved discussions. Please resolve these discussions',
'There are unresolved threads. Please resolve these threads',
);
expect(vm.$el.innerText).toContain('Create an issue to resolve them later');
......@@ -29,14 +29,14 @@ describe('UnresolvedDiscussions', () => {
});
});
describe('without discussions path', () => {
describe('without threads path', () => {
beforeEach(() => {
vm = mountComponent(Component, { mr: {} });
});
it('should not show create issue link if user cannot create issue', () => {
expect(vm.$el.innerText).toContain(
'There are unresolved discussions. Please resolve these discussions',
'There are unresolved threads. Please resolve these threads',
);
expect(vm.$el.querySelector('.js-create-issue')).toEqual(null);
......
......@@ -1148,7 +1148,7 @@ describe SystemNoteService do
end
it 'sets the note text' do
expect(subject.note).to eq 'resolved all discussions'
expect(subject.note).to eq 'resolved all threads'
end
end
......
shared_examples 'discussion comments' do |resource_name|
shared_examples 'thread comments' do |resource_name|
let(:form_selector) { '.js-main-target-form' }
let(:dropdown_selector) { "#{form_selector} .comment-type-dropdown" }
let(:toggle_selector) { "#{dropdown_selector} .dropdown-toggle" }
......@@ -48,7 +48,7 @@ shared_examples 'discussion comments' do |resource_name|
find(toggle_selector).click
end
it 'has a "Comment" item (selected by default) and "Start discussion" item' do
it 'has a "Comment" item (selected by default) and "Start thread" item' do
expect(page).to have_selector menu_selector
find("#{menu_selector} li", match: :first)
......@@ -59,7 +59,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(items.first).to have_selector '.fa-check'
expect(items.first['class']).to match 'droplab-item-selected'
expect(items.last).to have_content 'Start discussion'
expect(items.last).to have_content 'Start thread'
expect(items.last).to have_content "Discuss a specific suggestion or question#{' that needs to be resolved' if resource_name == 'merge request'}."
expect(items.last).not_to have_selector '.fa-check'
expect(items.last['class']).not_to match 'droplab-item-selected'
......@@ -103,7 +103,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(find(dropdown_selector)).to have_content 'Comment'
end
describe 'when selecting "Start discussion"' do
describe 'when selecting "Start thread"' do
before do
find("#{menu_selector} li", match: :first)
all("#{menu_selector} li").last.click
......@@ -114,9 +114,9 @@ shared_examples 'discussion comments' do |resource_name|
# on issues page, the submit input is a <button>, on other pages it is <input>
if button.tag_name == 'button'
expect(find(submit_selector)).to have_content 'Start discussion'
expect(find(submit_selector)).to have_content 'Start thread'
else
expect(find(submit_selector).value).to eq 'Start discussion'
expect(find(submit_selector).value).to eq 'Start thread'
end
expect(page).not_to have_selector menu_selector
......@@ -124,17 +124,17 @@ shared_examples 'discussion comments' do |resource_name|
if resource_name =~ /(issue|merge request)/
it 'updates the close button text' do
expect(find(close_selector)).to have_content "Start discussion & close #{resource_name}"
expect(find(close_selector)).to have_content "Start thread & close #{resource_name}"
end
it 'typing does not change the close button text' do
find("#{form_selector} .note-textarea").send_keys('b')
expect(find(close_selector)).to have_content "Start discussion & close #{resource_name}"
expect(find(close_selector)).to have_content "Start thread & close #{resource_name}"
end
end
describe 'creating a discussion' do
describe 'creating a thread' do
before do
find(submit_selector).click
wait_for_requests
......@@ -150,7 +150,7 @@ shared_examples 'discussion comments' do |resource_name|
wait_for_requests
end
it 'clicking "Start discussion" will post a discussion' do
it 'clicking "Start thread" will post a thread' do
new_comment = all(comments_selector).last
expect(new_comment).to have_content 'a'
......@@ -179,7 +179,7 @@ shared_examples 'discussion comments' do |resource_name|
let(:reply_id) { find("#{comments_selector} .note:last-of-type", match: :first)['data-note-id'] }
it 'can be replied to after resolving' do
click_button "Resolve discussion"
click_button "Resolve thread"
wait_for_requests
refresh
......@@ -188,10 +188,10 @@ shared_examples 'discussion comments' do |resource_name|
submit_reply('to reply or not reply')
end
it 'shows resolved discussion when toggled' do
it 'shows resolved thread when toggled' do
submit_reply('a')
click_button "Resolve discussion"
click_button "Resolve thread"
wait_for_requests
expect(page).to have_selector(".note-row-#{note_id}", visible: true)
......@@ -205,7 +205,7 @@ shared_examples 'discussion comments' do |resource_name|
end
if resource_name == 'issue'
it "clicking 'Start discussion & close #{resource_name}' will post a discussion and close the #{resource_name}" do
it "clicking 'Start thread & close #{resource_name}' will post a thread and close the #{resource_name}" do
find(close_selector).click
find(comments_selector, match: :first)
......@@ -224,7 +224,7 @@ shared_examples 'discussion comments' do |resource_name|
find(toggle_selector).click
end
it 'has "Start discussion" selected' do
it 'has "Start thread" selected' do
find("#{menu_selector} li", match: :first)
items = all("#{menu_selector} li")
......@@ -232,7 +232,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(items.first).not_to have_selector '.fa-check'
expect(items.first['class']).not_to match 'droplab-item-selected'
expect(items.last).to have_content 'Start discussion'
expect(items.last).to have_content 'Start thread'
expect(items.last).to have_selector '.fa-check'
expect(items.last['class']).to match 'droplab-item-selected'
end
......@@ -277,7 +277,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(items.first).to have_selector '.fa-check'
expect(items.first['class']).to match 'droplab-item-selected'
expect(items.last).to have_content 'Start discussion'
expect(items.last).to have_content 'Start thread'
expect(items.last).not_to have_selector '.fa-check'
expect(items.last['class']).not_to match 'droplab-item-selected'
end
......@@ -299,13 +299,13 @@ shared_examples 'discussion comments' do |resource_name|
expect(find("#{form_selector} .js-note-target-reopen")).to have_content "Comment & reopen #{resource_name}"
end
it "should show a 'Start discussion & reopen #{resource_name}' button when 'Start discussion' is selected" do
it "should show a 'Start thread & reopen #{resource_name}' button when 'Start thread' is selected" do
find(toggle_selector).click
find("#{menu_selector} li", match: :first)
all("#{menu_selector} li").last.click
expect(find("#{form_selector} .js-note-target-reopen")).to have_content "Start discussion & reopen #{resource_name}"
expect(find("#{form_selector} .js-note-target-reopen")).to have_content "Start thread & reopen #{resource_name}"
end
end
end
......
shared_examples 'creating an issue for a discussion' do
shared_examples 'creating an issue for a thread' do
it 'shows an issue with the title filled in' do
title_field = page.find_field('issue[title]')
......
......@@ -16,7 +16,7 @@ shared_examples 'comment on merge request file' do
visit(merge_request_path(merge_request))
page.within('.notes .discussion') do
expect(page).to have_content("#{user.name} #{user.to_reference} started a discussion")
expect(page).to have_content("#{user.name} #{user.to_reference} started a thread")
expect(page).to have_content(sample_commit.line_code_path)
expect(page).to have_content('Line is wrong')
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