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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
017ed4ae
Commit
017ed4ae
authored
Apr 06, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed builds
parent
8cdb5058
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
23 deletions
+30
-23
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+4
-0
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+1
-8
app/views/projects/merge_requests/_new_compare.html.haml
app/views/projects/merge_requests/_new_compare.html.haml
+4
-4
features/project/forked_merge_requests.feature
features/project/forked_merge_requests.feature
+1
-0
features/project/merge_requests.feature
features/project/merge_requests.feature
+1
-0
features/steps/project/forked_merge_requests.rb
features/steps/project/forked_merge_requests.rb
+13
-9
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+6
-2
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
017ed4ae
...
...
@@ -235,6 +235,10 @@
padding
:
0
;
background
:
transparent
;
}
.ci-status-link
{
margin-right
:
5px
;
}
}
.merge-request-select
{
...
...
app/views/projects/commits/_commit.html.haml
View file @
017ed4ae
...
...
@@ -19,16 +19,9 @@
.pull-right
-
if
ci_commit
=
render_ci_status
(
ci_commit
)
=
clipboard_button
(
clipboard_text:
commit
.
id
)
=
link_to
commit
.
short_id
,
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
),
class:
"commit_short_id"
.notes_count
-
if
note_count
>
0
%span
.light
%i
.fa.fa-comments
=
note_count
-
if
commit
.
description?
.commit-row-description.js-toggle-content
%pre
...
...
app/views/projects/merge_requests/_new_compare.html.haml
View file @
017ed4ae
...
...
@@ -12,7 +12,7 @@
.merge-request-select.dropdown
=
f
.
hidden_field
:source_project_id
=
dropdown_toggle
@merge_request
.
source_project_path
,
{
toggle:
"dropdown"
,
field_name:
"
#{
f
.
object_name
}
[source_project_id]"
,
disabled:
@merge_request
.
persisted?
},
{
toggle_class:
"js-compare-dropdown js-source-project"
}
.dropdown-menu.dropdown-menu-selectable
.dropdown-menu.dropdown-menu-selectable
.dropdown-source-project
=
dropdown_title
(
"Select source project"
)
=
dropdown_filter
(
"Search projects"
)
=
dropdown_content
do
...
...
@@ -23,7 +23,7 @@
.merge-request-select.dropdown
=
f
.
hidden_field
:source_branch
=
dropdown_toggle
"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-menu.dropdown-menu-selectable
.dropdown-source-branch
=
dropdown_title
(
"Select source branch"
)
=
dropdown_filter
(
"Search branches"
)
=
dropdown_content
do
...
...
@@ -45,7 +45,7 @@
.merge-request-select.dropdown
=
f
.
hidden_field
:target_project_id
=
dropdown_toggle
f
.
object
.
target_project
.
path_with_namespace
,
{
toggle:
"dropdown"
,
field_name:
"
#{
f
.
object_name
}
[target_project_id]"
,
disabled:
@merge_request
.
persisted?
},
{
toggle_class:
"js-compare-dropdown js-target-project"
}
.dropdown-menu.dropdown-menu-selectable
.dropdown-menu.dropdown-menu-selectable
.dropdown-target-project
=
dropdown_title
(
"Select target project"
)
=
dropdown_filter
(
"Search projects"
)
=
dropdown_content
do
...
...
@@ -57,7 +57,7 @@
.merge-request-select.dropdown
=
f
.
hidden_field
:target_branch
=
dropdown_toggle
f
.
object
.
target_branch
,
{
toggle:
"dropdown"
,
field_name:
"
#{
f
.
object_name
}
[target_branch]"
},
{
toggle_class:
"js-compare-dropdown js-target-branch"
}
.dropdown-menu.dropdown-menu-selectable.js-target-branch-dropdown
.dropdown-menu.dropdown-menu-selectable.
dropdown-target-branch.
js-target-branch-dropdown
=
dropdown_title
(
"Select target branch"
)
=
dropdown_filter
(
"Search branches"
)
=
dropdown_content
do
...
...
features/project/forked_merge_requests.feature
View file @
017ed4ae
...
...
@@ -4,6 +4,7 @@ Feature: Project Forked Merge Requests
And
I am a member of project
"Shop"
And
I have a project forked off of
"Shop"
called
"Forked Shop"
@javascript
Scenario
:
I
submit new unassigned merge request to a forked project
Given
I visit project
"Forked Shop"
merge requests page
And
I click link
"New Merge Request"
...
...
features/project/merge_requests.feature
View file @
017ed4ae
...
...
@@ -70,6 +70,7 @@ Feature: Project Merge Requests
When
I click link
"Reopen"
Then
I should see reopened merge request
"Bug NS-04"
@javascript
Scenario
:
I
submit new unassigned merge request
Given
I click link
"New Merge Request"
And
I submit new merge request
"Wiki Feature"
...
...
features/steps/project/forked_merge_requests.rb
View file @
017ed4ae
...
...
@@ -34,10 +34,14 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step
'I fill out a "Merge Request On Forked Project" merge request'
do
select
@forked_project
.
path_with_namespace
,
from:
"merge_request_source_project_id"
select
@project
.
path_with_namespace
,
from:
"merge_request_target_project_id"
select
"fix"
,
from:
"merge_request_source_branch"
select
"master"
,
from:
"merge_request_target_branch"
first
(
'.js-source-project'
).
click
first
(
'.dropdown-source-project a'
,
text:
@forked_project
.
path_with_namespace
)
first
(
'.js-target-project'
).
click
first
(
'.dropdown-target-project a'
,
text:
@project
.
path_with_namespace
)
first
(
'.js-source-branch'
).
click
first
(
'.dropdown-source-branch .dropdown-content a'
,
text:
'fix'
).
click
click_button
"Compare branches and continue"
...
...
@@ -115,10 +119,10 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step
'I fill out an invalid "Merge Request On Forked Project" merge request'
do
expect
(
find
(
:select
,
"merge_request_source_project_id"
,
{}
).
value
).
to
eq
@forked_project
.
id
.
to_s
expect
(
find
(
:select
,
"merge_request_target_project_id"
,
{}
).
value
).
to
eq
@project
.
id
.
to_s
expect
(
find
(
:select
,
"merge_request_source_branch"
,
{}).
value
).
to
eq
""
expect
(
find
(
:select
,
"merge_request_target_branch"
,
{}
).
value
).
to
eq
"master"
expect
(
find
_by_id
(
"merge_request_source_project_id"
,
visible:
false
).
value
).
to
eq
@forked_project
.
id
.
to_s
expect
(
find
_by_id
(
"merge_request_target_project_id"
,
visible:
false
).
value
).
to
eq
@project
.
id
.
to_s
expect
(
find
_by_id
(
"merge_request_source_branch"
,
visible:
false
).
value
).
to
eq
nil
expect
(
find
_by_id
(
"merge_request_target_branch"
,
visible:
false
).
value
).
to
eq
"master"
click_button
"Compare branches"
end
...
...
@@ -127,7 +131,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step
'the target repository should be the original repository'
do
expect
(
page
).
to
have_select
(
"merge_request_target_project_id"
,
selected:
@project
.
path_with_namespace
)
expect
(
find_by_id
(
"merge_request_target_project_id"
).
value
).
to
eq
"
#{
@project
.
id
}
"
end
step
'I click "Assign to" dropdown"'
do
...
...
features/steps/project/merge_requests.rb
View file @
017ed4ae
...
...
@@ -93,8 +93,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I submit new merge request "Wiki Feature"'
do
select
"fix"
,
from:
"merge_request_source_branch"
select
"feature"
,
from:
"merge_request_target_branch"
find
(
'.js-source-branch'
).
click
find
(
'.dropdown-source-branch .dropdown-content a'
,
text:
'fix'
).
click
find
(
'.js-target-branch'
).
click
first
(
'.dropdown-target-branch .dropdown-content a'
,
text:
'feature'
).
click
click_button
"Compare branches"
fill_in
"merge_request_title"
,
with:
"Wiki Feature"
click_button
"Submit merge request"
...
...
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