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
42da7cd3
Commit
42da7cd3
authored
Dec 21, 2015
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redirect to wrong URL when merging and MR detail URL has an anchor. #4189
parent
25bf3eb8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+1
-1
features/project/merge_requests/accept.feature
features/project/merge_requests/accept.feature
+8
-0
features/steps/project/merge_requests/acceptance.rb
features/steps/project/merge_requests/acceptance.rb
+4
-0
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
42da7cd3
...
...
@@ -18,7 +18,7 @@ class @MergeRequestWidget
if
data
.
state
==
"merged"
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
$
(
'.mr-widget-body'
).
html
(
"<h4>"
+
data
.
merge_error
+
"</h4>"
)
else
...
...
features/project/merge_requests/accept.feature
View file @
42da7cd3
...
...
@@ -12,6 +12,14 @@ Feature: Project Merge Requests Acceptance
Then
I should see merge request merged
And
I should not see the Remove Source Branch button
@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
Given
I am on the Merge Request detail page
...
...
features/steps/project/merge_requests/acceptance.rb
View file @
42da7cd3
...
...
@@ -6,6 +6,10 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
visit
merge_request_path
(
@merge_request
)
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
check
(
'Remove source branch'
)
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