Commit e7094236 authored by Alin Ciciu's avatar Alin Ciciu Committed by Robert Speicher

Fix mention in edit mr

parent 8f5c9531
......@@ -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
......
---
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
......
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