Commit 2de4f7d0 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/342494/conflictsSidebarReviewers' into 'master'

Adds reviewers to merge conflicts sidebar

See merge request gitlab-org/gitlab!72208
parents 33dfa884 f691eece
...@@ -35,7 +35,11 @@ export default { ...@@ -35,7 +35,11 @@ export default {
<td :class="lineCssClass(line)" class="diff-line-num header"></td> <td :class="lineCssClass(line)" class="diff-line-num header"></td>
<td :class="lineCssClass(line)" class="line_content header"> <td :class="lineCssClass(line)" class="line_content header">
<strong>{{ line.richText }}</strong> <strong>{{ line.richText }}</strong>
<button type="button" @click="handleSelected({ file, line })"> <button
type="button"
class="gl-border-1 gl-border-solid"
@click="handleSelected({ file, line })"
>
{{ line.buttonTitle }} {{ line.buttonTitle }}
</button> </button>
</td> </td>
......
...@@ -35,7 +35,11 @@ export default { ...@@ -35,7 +35,11 @@ export default {
<td class="diff-line-num header" :class="lineCssClass(line)"></td> <td class="diff-line-num header" :class="lineCssClass(line)"></td>
<td class="line_content header" :class="lineCssClass(line)"> <td class="line_content header" :class="lineCssClass(line)">
<strong>{{ line.richText }}</strong> <strong>{{ line.richText }}</strong>
<button type="button" @click="handleSelected({ file, line })"> <button
type="button"
class="gl-border-1 gl-border-solid"
@click="handleSelected({ file, line })"
>
{{ line.buttonTitle }} {{ line.buttonTitle }}
</button> </button>
</td> </td>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.merge-request-details.issuable-details .merge-request-details.issuable-details
= render "projects/merge_requests/mr_box" = render "projects/merge_requests/mr_box"
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, source_branch: @merge_request.source_branch = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch
#conflicts{ data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json), #conflicts{ data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json),
resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request), resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request),
......
...@@ -9,7 +9,7 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do ...@@ -9,7 +9,7 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do
let(:user) { project.creator } let(:user) { project.creator }
def create_merge_request(source_branch) def create_merge_request(source_branch)
create(:merge_request, source_branch: source_branch, target_branch: 'conflict-start', source_project: project, merge_status: :unchecked) do |mr| create(:merge_request, source_branch: source_branch, target_branch: 'conflict-start', source_project: project, merge_status: :unchecked, reviewers: [user]) do |mr|
mr.mark_as_unmergeable mr.mark_as_unmergeable
end end
end end
...@@ -178,6 +178,23 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do ...@@ -178,6 +178,23 @@ RSpec.describe 'Merge request > User resolves conflicts', :js do
end end
end end
context 'sidebar' do
let(:merge_request) { create_merge_request('conflict-resolvable') }
before do
project.add_developer(user)
sign_in(user)
visit conflicts_project_merge_request_path(project, merge_request)
end
it 'displays reviewers' do
page.within '.issuable-sidebar' do
expect(page).to have_selector('[data-testid="reviewer"]', count: 1)
end
end
end
unresolvable_conflicts = { unresolvable_conflicts = {
'conflict-too-large' => 'when the conflicts contain a large file', 'conflict-too-large' => 'when the conflicts contain a large file',
'conflict-binary-file' => 'when the conflicts contain a binary file', 'conflict-binary-file' => 'when the conflicts contain a binary file',
......
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