Fix mention in edit mr
This commit is contained in:
parent
8f5c953149
commit
e7094236a0
|
@ -330,6 +330,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
@source_project = @merge_request.source_project
|
||||
@target_project = @merge_request.target_project
|
||||
@target_branches = @merge_request.target_project.repository.branch_names
|
||||
@noteable = @merge_request
|
||||
end
|
||||
|
||||
def finder_type
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixed mention autocomplete in edit merge request.
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -885,4 +885,18 @@ describe Projects::MergeRequestsController do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET edit' do
|
||||
it 'responds successfully' do
|
||||
get :edit, namespace_id: project.namespace, project_id: project, id: merge_request
|
||||
|
||||
expect(response).to have_gitlab_http_status(:success)
|
||||
end
|
||||
|
||||
it 'assigns the noteable to make sure autocompletes work' do
|
||||
get :edit, namespace_id: project.namespace, project_id: project, id: merge_request
|
||||
|
||||
expect(assigns(:noteable)).not_to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,9 +73,13 @@ RSpec.shared_examples 'an editable merge request' do
|
|||
|
||||
it 'description has autocomplete', :js do
|
||||
find('#merge_request_description').native.send_keys('')
|
||||
fill_in 'merge_request_description', with: '@'
|
||||
fill_in 'merge_request_description', with: user.to_reference[0..4]
|
||||
|
||||
expect(page).to have_selector('.atwho-view')
|
||||
wait_for_requests
|
||||
|
||||
page.within('.atwho-view') do
|
||||
expect(page).to have_content(user2.name)
|
||||
end
|
||||
end
|
||||
|
||||
it 'has class js-quick-submit in form' do
|
||||
|
|
Loading…
Reference in New Issue