BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
541da4d5
Commit
541da4d5
authored
Dec 24, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_4189' into 'master'
Fix redirect to wrong URL when merging and MR detail URL has an anchor. Closes #4189 See merge request !2169
parents
e622259d
42da7cd3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+1
-1
accept.feature
features/project/merge_requests/accept.feature
+8
-0
acceptance.rb
features/steps/project/merge_requests/acceptance.rb
+4
-0
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
541da4d5
...
@@ -18,7 +18,7 @@ class @MergeRequestWidget
...
@@ -18,7 +18,7 @@ class @MergeRequestWidget
if
data
.
state
==
"merged"
if
data
.
state
==
"merged"
urlSuffix
=
if
deleteSourceBranch
then
'?delete_source=true'
else
''
urlSuffix
=
if
deleteSourceBranch
then
'?delete_source=true'
else
''
window
.
location
.
href
=
window
.
location
.
href
+
urlSuffix
window
.
location
.
href
=
window
.
location
.
pathname
+
urlSuffix
else
if
data
.
merge_error
else
if
data
.
merge_error
$
(
'.mr-widget-body'
).
html
(
"<h4>"
+
data
.
merge_error
+
"</h4>"
)
$
(
'.mr-widget-body'
).
html
(
"<h4>"
+
data
.
merge_error
+
"</h4>"
)
else
else
...
...
features/project/merge_requests/accept.feature
View file @
541da4d5
...
@@ -13,6 +13,14 @@ Feature: Project Merge Requests Acceptance
...
@@ -13,6 +13,14 @@ Feature: Project Merge Requests Acceptance
And
I should not see the Remove Source Branch button
And
I should not see the Remove Source Branch button
@javascript
@javascript
Scenario
:
Accepting the Merge Request when URL has an anchor
Given
I am on the Merge Request detail with note anchor page
When
I click on
"Remove source branch"
option
And
I click on Accept Merge Request
Then
I should see merge request merged
And
I should not see the Remove Source Branch button
@javascript
Scenario
:
Accepting the Merge Request without removing the source branch
Scenario
:
Accepting the Merge Request without removing the source branch
Given
I am on the Merge Request detail page
Given
I am on the Merge Request detail page
When
I click on Accept Merge Request
When
I click on Accept Merge Request
...
...
features/steps/project/merge_requests/acceptance.rb
View file @
541da4d5
...
@@ -6,6 +6,10 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
...
@@ -6,6 +6,10 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
visit
merge_request_path
(
@merge_request
)
visit
merge_request_path
(
@merge_request
)
end
end
step
'I am on the Merge Request detail with note anchor page'
do
visit
merge_request_path
(
@merge_request
,
anchor:
'note_123'
)
end
step
'I click on "Remove source branch" option'
do
step
'I click on "Remove source branch" option'
do
check
(
'Remove source branch'
)
check
(
'Remove source branch'
)
end
end
...
...
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