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
Léo-Paul Géneau
gitlab-ce
Commits
3ce2ba1a
Commit
3ce2ba1a
authored
Nov 25, 2016
by
basyura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix display hook error message
parent
024ca242
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
app/assets/javascripts/merge_request_widget.js.es6
app/assets/javascripts/merge_request_widget.js.es6
+1
-1
changelogs/unreleased/issue_24020.yml
changelogs/unreleased/issue_24020.yml
+4
-0
spec/javascripts/merge_request_widget_spec.js
spec/javascripts/merge_request_widget_spec.js
+12
-0
No files found.
app/assets/javascripts/merge_request_widget.js.es6
View file @
3ce2ba1a
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
urlSuffix = deleteSourceBranch ? '?deleted_source_branch=true' : '';
urlSuffix = deleteSourceBranch ? '?deleted_source_branch=true' : '';
return window.location.href = window.location.pathname + urlSuffix;
return window.location.href = window.location.pathname + urlSuffix;
} else if (data.merge_error) {
} else if (data.merge_error) {
return this.$widgetBody.html("<h4>" + data.merge_error + "</h4>");
return
_
this.$widgetBody.html("<h4>" + data.merge_error + "</h4>");
} else {
} else {
callback = function() {
callback = function() {
return merge_request_widget.mergeInProgress(deleteSourceBranch);
return merge_request_widget.mergeInProgress(deleteSourceBranch);
...
...
changelogs/unreleased/issue_24020.yml
0 → 100644
View file @
3ce2ba1a
---
title
:
"
fix
display
hook
error
message"
merge_request
:
7775
author
:
basyura
spec/javascripts/merge_request_widget_spec.js
View file @
3ce2ba1a
...
@@ -106,6 +106,18 @@
...
@@ -106,6 +106,18 @@
});
});
});
});
describe
(
'
mergeInProgress
'
,
function
()
{
it
(
'
should display error with h4 tag
'
,
function
()
{
spyOn
(
this
.
class
.
$widgetBody
,
'
html
'
).
and
.
callFake
(
function
(
html
)
{
expect
(
html
).
toBe
(
'
<h4>Sorry, something went wrong.</h4>
'
);
});
spyOn
(
$
,
'
ajax
'
).
and
.
callFake
(
function
(
e
)
{
e
.
success
({
merge_error
:
'
Sorry, something went wrong.
'
});
});
this
.
class
.
mergeInProgress
(
null
);
});
});
return
describe
(
'
getCIStatus
'
,
function
()
{
return
describe
(
'
getCIStatus
'
,
function
()
{
beforeEach
(
function
()
{
beforeEach
(
function
()
{
this
.
ciStatusData
=
{
this
.
ciStatusData
=
{
...
...
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