Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
e7094236
Commit
e7094236
authored
Sep 12, 2018
by
Alin Ciciu
Committed by
Robert Speicher
Sep 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mention in edit mr
parent
8f5c9531
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
changelogs/unreleased/fix-mention-in-edit-mr.yml
changelogs/unreleased/fix-mention-in-edit-mr.yml
+5
-0
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+14
-0
spec/support/shared_examples/features/editable_merge_request_shared_examples.rb
...amples/features/editable_merge_request_shared_examples.rb
+6
-2
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
e7094236
...
...
@@ -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
...
...
changelogs/unreleased/fix-mention-in-edit-mr.yml
0 → 100644
View file @
e7094236
---
title
:
Fixed mention autocomplete in edit merge request.
merge_request
:
author
:
type
:
fixed
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
e7094236
...
...
@@ -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
spec/support/shared_examples/features/editable_merge_request_shared_examples.rb
View file @
e7094236
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment