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
Jérome Perrin
gitlab-ce
Commits
9cc19d9b
Commit
9cc19d9b
authored
Dec 05, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove wrong '.builds-feature' class from the MR settings fieldset
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
30815a89
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
19 deletions
+99
-19
app/views/projects/_merge_request_merge_settings.html.haml
app/views/projects/_merge_request_merge_settings.html.haml
+15
-0
app/views/projects/_merge_request_settings.html.haml
app/views/projects/_merge_request_settings.html.haml
+8
-18
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+2
-1
changelogs/unreleased/25171-fix-mr-features-settings-hidden-when-builds-are-disabled.yml
...-mr-features-settings-hidden-when-builds-are-disabled.yml
+4
-0
spec/features/projects/settings/merge_requests_settings_spec.rb
...eatures/projects/settings/merge_requests_settings_spec.rb
+70
-0
No files found.
app/views/projects/_merge_request_merge_settings.html.haml
0 → 100644
View file @
9cc19d9b
-
form
=
local_assigns
.
fetch
(
:form
)
.form-group
.checkbox.builds-feature
=
form
.
label
:only_allow_merge_if_build_succeeds
do
=
form
.
check_box
:only_allow_merge_if_build_succeeds
%strong
Only allow merge requests to be merged if the build succeeds
%br
%span
.descr
Builds need to be configured to enable this feature.
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/project/merge_requests/merge_when_build_succeeds'
,
anchor:
'only-allow-merge-requests-to-be-merged-if-the-build-succeeds'
)
.checkbox
=
form
.
label
:only_allow_merge_if_all_discussions_are_resolved
do
=
form
.
check_box
:only_allow_merge_if_all_discussions_are_resolved
%strong
Only allow merge requests to be merged if all discussions are resolved
app/views/projects/_merge_request_settings.html.haml
View file @
9cc19d9b
.merge-requests-feature
%fieldset
.builds-feature
%hr
%h5
.prepend-top-0
Merge Requests
.form-group
.checkbox
=
f
.
label
:only_allow_merge_if_build_succeeds
do
=
f
.
check_box
:only_allow_merge_if_build_succeeds
%strong
Only allow merge requests to be merged if the build succeeds
%br
%span
.descr
Builds need to be configured to enable this feature.
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/project/merge_requests/merge_when_build_succeeds'
,
anchor:
'only-allow-merge-requests-to-be-merged-if-the-build-succeeds'
)
.checkbox
=
f
.
label
:only_allow_merge_if_all_discussions_are_resolved
do
=
f
.
check_box
:only_allow_merge_if_all_discussions_are_resolved
%strong
Only allow merge requests to be merged if all discussions are resolved
-
form
=
local_assigns
.
fetch
(
:form
)
%fieldset
.features.merge-requests-feature.append-bottom-default
%hr
%h5
.prepend-top-0
Merge Requests
=
render
'projects/merge_request_merge_settings'
,
form:
form
app/views/projects/edit.html.haml
View file @
9cc19d9b
...
...
@@ -112,7 +112,8 @@
%span
.descr
Enable Container Registry for this project
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/project/container_registry'
),
target:
'_blank'
=
render
'merge_request_settings'
,
f:
f
=
render
'merge_request_settings'
,
form:
f
%hr
%fieldset
.features.append-bottom-default
%h5
.prepend-top-0
...
...
changelogs/unreleased/25171-fix-mr-features-settings-hidden-when-builds-are-disabled.yml
0 → 100644
View file @
9cc19d9b
---
title
:
Remove wrong '.builds-feature' class from the MR settings fieldset
merge_request
:
7930
author
:
spec/features/projects/settings/merge_requests_settings_spec.rb
0 → 100644
View file @
9cc19d9b
require
'spec_helper'
feature
'Project settings > Merge Requests'
,
feature:
true
,
js:
true
do
include
GitlabRoutingHelper
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
background
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
context
'when Merge Request and Builds are initially enabled'
do
before
do
project
.
project_feature
.
update_attribute
(
'merge_requests_access_level'
,
ProjectFeature
::
ENABLED
)
end
context
'when Builds are initially enabled'
do
before
do
project
.
project_feature
.
update_attribute
(
'builds_access_level'
,
ProjectFeature
::
ENABLED
)
visit
edit_project_path
(
project
)
end
scenario
'shows the Merge Requests settings'
do
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
select
'Disabled'
,
from:
"project_project_feature_attributes_merge_requests_access_level"
expect
(
page
).
not_to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
not_to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
end
end
context
'when Builds are initially disabled'
do
before
do
project
.
project_feature
.
update_attribute
(
'builds_access_level'
,
ProjectFeature
::
DISABLED
)
visit
edit_project_path
(
project
)
end
scenario
'shows the Merge Requests settings that do not depend on Builds feature'
do
expect
(
page
).
not_to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
select
'Everyone with access'
,
from:
"project_project_feature_attributes_builds_access_level"
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
end
end
end
context
'when Merge Request are initially disabled'
do
before
do
project
.
project_feature
.
update_attribute
(
'merge_requests_access_level'
,
ProjectFeature
::
DISABLED
)
visit
edit_project_path
(
project
)
end
scenario
'does not show the Merge Requests settings'
do
expect
(
page
).
not_to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
not_to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
select
'Everyone with access'
,
from:
"project_project_feature_attributes_merge_requests_access_level"
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if the build succeeds'
)
expect
(
page
).
to
have_content
(
'Only allow merge requests to be merged if all discussions are resolved'
)
end
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