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
d12d89b6
Commit
d12d89b6
authored
Jan 04, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide pipeline quota link when group has no projects which are limited and add tests
parent
a64e28fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
app/views/layouts/nav/_group_settings.html.haml
app/views/layouts/nav/_group_settings.html.haml
+5
-4
spec/features/groups/pipeline_quota.rb
spec/features/groups/pipeline_quota.rb
+32
-0
No files found.
app/views/layouts/nav/_group_settings.html.haml
View file @
d12d89b6
...
...
@@ -28,9 +28,10 @@
=
link_to
group_audit_events_path
(
@group
),
title:
"Audit Events"
do
%span
Audit Events
=
nav_link
(
controller: :pipeline_quota
)
do
=
link_to
group_pipeline_quota_path
(
@group
),
title:
"Pipeline Quota"
do
%span
Pipeline Quota
-
if
@group
.
shared_runners_enabled?
&&
@group
.
shared_runners_minutes_limit_enabled?
=
nav_link
(
controller: :pipeline_quota
)
do
=
link_to
group_pipeline_quota_path
(
@group
),
title:
"Pipeline Quota"
do
%span
Pipeline Quota
%li
=
link_to
'Edit Group'
,
edit_group_path
(
@group
)
spec/features/groups/pipeline_quota.rb
View file @
d12d89b6
...
...
@@ -13,6 +13,14 @@ feature 'Groups > Pipeline Quota', feature: true do
context
'with no quota'
do
let
(
:group
)
{
create
(
:group
,
:with_build_minutes
)
}
it
'is not linked within the group settings dropdown'
do
visit
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
not_to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
it
'shows correct ratio and status'
do
visit_pipeline_quota_page
...
...
@@ -27,6 +35,14 @@ feature 'Groups > Pipeline Quota', feature: true do
let
(
:group
)
{
create
(
:group
,
:with_not_used_build_minutes_limit
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
it
'is not linked within the group settings dropdown'
do
visit
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
not_to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
it
'shows correct ratio and status'
do
visit_pipeline_quota_page
...
...
@@ -40,6 +56,14 @@ feature 'Groups > Pipeline Quota', feature: true do
context
'minutes under quota'
do
let
(
:group
)
{
create
(
:group
,
:with_not_used_build_minutes_limit
)
}
it
'is linked within the group settings dropdown'
do
visit
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
it
'shows correct ratio and status'
do
visit_pipeline_quota_page
...
...
@@ -54,6 +78,14 @@ feature 'Groups > Pipeline Quota', feature: true do
context
'minutes over quota'
do
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
it
'is linked within the group settings dropdown'
do
visit
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
it
'shows correct ratio and status'
do
visit_pipeline_quota_page
...
...
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