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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
8eb51dc0
Commit
8eb51dc0
authored
Dec 16, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix updating and disabling merge button when Merge Immediately is clicked
parent
d89216ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+4
-4
spec/features/merge_requests/merge_when_build_succeeds_spec.rb
...features/merge_requests/merge_when_build_succeeds_spec.rb
+3
-3
No files found.
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
8eb51dc0
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
.accept-action
.accept-action
-
if
@ci_commit
&&
@ci_commit
.
active?
-
if
@ci_commit
&&
@ci_commit
.
active?
%span
.btn-group
%span
.btn-group
=
link_to
"#"
,
class:
"btn btn-create
merge_when_build_succeeds"
do
=
button_tag
class:
"btn btn-create js-merge-button
merge_when_build_succeeds"
do
Merge When Build Succeeds
Merge When Build Succeeds
%a
.btn.btn-success.dropdown-toggle
{
'data-toggle'
=>
'dropdown'
}
=
button_tag
class:
"btn btn-success dropdown-toggle"
,
'data-toggle'
=>
'dropdown'
do
%span
.caret
%span
.caret
%span
.sr-only
%span
.sr-only
Select Merge Moment
Select Merge Moment
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
=
icon
(
'warning fw'
)
=
icon
(
'warning fw'
)
Merge Immediately
Merge Immediately
-
else
-
else
=
f
.
button
class:
"btn btn-create btn-grouped accept_merge_request
#{
status_class
}
"
do
=
f
.
button
class:
"btn btn-create btn-grouped
js-merge-button
accept_merge_request
#{
status_class
}
"
do
Accept Merge Request
Accept Merge Request
-
if
@merge_request
.
can_remove_source_branch?
(
current_user
)
-
if
@merge_request
.
can_remove_source_branch?
(
current_user
)
.accept-control.checkbox
.accept-control.checkbox
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
:javascript
:javascript
$
(
'
.accept_merge_request
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.accept_merge_request
'
).
on
(
'
click
'
,
function
()
{
$
(
this
).
html
(
"
<i class='fa fa-spinner fa-spin'></i> Merge in progress
"
);
$
(
'
.js-merge-button
'
).
html
(
"
<i class='fa fa-spinner fa-spin'></i> Merge in progress
"
);
});
});
$
(
'
.accept-mr-form
'
).
on
(
'
ajax:send
'
,
function
()
{
$
(
'
.accept-mr-form
'
).
on
(
'
ajax:send
'
,
function
()
{
...
...
spec/features/merge_requests/merge_when_build_succeeds_spec.rb
View file @
8eb51dc0
...
@@ -21,12 +21,12 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
...
@@ -21,12 +21,12 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
end
end
it
'displays the Merge When Build Succeeds button'
do
it
'displays the Merge When Build Succeeds button'
do
expect
(
page
).
to
have_
link
"Merge When Build Succeeds"
expect
(
page
).
to
have_
button
"Merge When Build Succeeds"
end
end
context
"Merge When Build succeeds enabled"
do
context
"Merge When Build succeeds enabled"
do
before
do
before
do
click_
link
"Merge When Build Succeeds"
click_
button
"Merge When Build Succeeds"
end
end
it
'activates Merge When Build Succeeds feature'
do
it
'activates Merge When Build Succeeds feature'
do
...
@@ -58,7 +58,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
...
@@ -58,7 +58,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do
it
'cancels the automatic merge'
do
it
'cancels the automatic merge'
do
click_link
"Cancel Automatic Merge"
click_link
"Cancel Automatic Merge"
expect
(
page
).
to
have_
link
"Merge When Build Succeeds"
expect
(
page
).
to
have_
button
"Merge When Build Succeeds"
visit_merge_request
(
merge_request
)
# Needed to refresh the page
visit_merge_request
(
merge_request
)
# Needed to refresh the page
expect
(
page
).
to
have_content
"Canceled the automatic merge"
expect
(
page
).
to
have_content
"Canceled the automatic merge"
...
...
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