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
ef86353e
Commit
ef86353e
authored
Mar 20, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed source branch name not being in new merge request dropdown toggle
Closes #29660
parent
691402fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/views/projects/merge_requests/_new_compare.html.haml
app/views/projects/merge_requests/_new_compare.html.haml
+1
-1
spec/features/merge_requests/create_new_mr_spec.rb
spec/features/merge_requests/create_new_mr_spec.rb
+6
-0
No files found.
app/views/projects/merge_requests/_new_compare.html.haml
View file @
ef86353e
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
selected:
f
.
object
.
source_project_id
selected:
f
.
object
.
source_project_id
.merge-request-select.dropdown
.merge-request-select.dropdown
=
f
.
hidden_field
:source_branch
=
f
.
hidden_field
:source_branch
=
dropdown_toggle
local_assigns
.
fetch
(
f
.
object
.
source_branch
,
"Select source branch"
)
,
{
toggle:
"dropdown"
,
field_name:
"
#{
f
.
object_name
}
[source_branch]"
},
{
toggle_class:
"js-compare-dropdown js-source-branch"
}
=
dropdown_toggle
f
.
object
.
source_branch
||
"Select source branch"
,
{
toggle:
"dropdown"
,
field_name:
"
#{
f
.
object_name
}
[source_branch]"
},
{
toggle_class:
"js-compare-dropdown js-source-branch"
}
.dropdown-menu.dropdown-menu-selectable.dropdown-source-branch
.dropdown-menu.dropdown-menu-selectable.dropdown-source-branch
=
dropdown_title
(
"Select source branch"
)
=
dropdown_title
(
"Select source branch"
)
=
dropdown_filter
(
"Search branches"
)
=
dropdown_filter
(
"Search branches"
)
...
...
spec/features/merge_requests/create_new_mr_spec.rb
View file @
ef86353e
...
@@ -46,6 +46,12 @@ feature 'Create New Merge Request', feature: true, js: true do
...
@@ -46,6 +46,12 @@ feature 'Create New Merge Request', feature: true, js: true do
end
end
end
end
it
'populates source branch button'
do
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
change_branches:
true
,
merge_request:
{
target_branch:
'master'
,
source_branch:
'fix'
})
expect
(
find
(
'.js-source-branch'
)).
to
have_content
(
'fix'
)
end
it
'allows to change the diff view'
do
it
'allows to change the diff view'
do
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
target_branch:
'master'
,
source_branch:
'fix'
})
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
target_branch:
'master'
,
source_branch:
'fix'
})
...
...
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