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
241678fd
Commit
241678fd
authored
Jan 04, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show only projects with shared runners enabled on pipeline quota page, add tests
parent
9d67094b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
app/controllers/groups/pipeline_quota_controller.rb
app/controllers/groups/pipeline_quota_controller.rb
+1
-1
app/views/groups/pipeline_quota/index.html.haml
app/views/groups/pipeline_quota/index.html.haml
+1
-1
spec/features/groups/pipeline_quota.rb
spec/features/groups/pipeline_quota.rb
+14
-4
No files found.
app/controllers/groups/pipeline_quota_controller.rb
View file @
241678fd
...
@@ -4,6 +4,6 @@ class Groups::PipelineQuotaController < Groups::ApplicationController
...
@@ -4,6 +4,6 @@ class Groups::PipelineQuotaController < Groups::ApplicationController
layout
'group_settings'
layout
'group_settings'
def
index
def
index
@projects
=
@group
.
projects
.
page
(
params
[
:page
])
@projects
=
@group
.
projects
.
where
(
shared_runners_enabled:
true
).
page
(
params
[
:page
])
end
end
end
end
app/views/groups/pipeline_quota/index.html.haml
View file @
241678fd
...
@@ -40,6 +40,6 @@
...
@@ -40,6 +40,6 @@
-
if
@projects
.
blank?
-
if
@projects
.
blank?
%tr
%tr
%td
{
colspan:
2
}
%td
{
colspan:
2
}
.nothing-here-block
This group has no projects
.nothing-here-block
This group has no projects
which use shared runners
=
paginate
@projects
,
theme:
"gitlab"
=
paginate
@projects
,
theme:
"gitlab"
spec/features/groups/pipeline_quota.rb
View file @
241678fd
...
@@ -21,7 +21,7 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -21,7 +21,7 @@ feature 'Groups > Pipeline Quota', feature: true do
end
end
end
end
it
'shows correct
ratio and status
'
do
it
'shows correct
group quota info
'
do
visit_pipeline_quota_page
visit_pipeline_quota_page
page
.
within
(
'.pipeline-quota'
)
do
page
.
within
(
'.pipeline-quota'
)
do
...
@@ -43,13 +43,17 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -43,13 +43,17 @@ feature 'Groups > Pipeline Quota', feature: true do
end
end
end
end
it
'shows correct
ratio and status
'
do
it
'shows correct
group quota info
'
do
visit_pipeline_quota_page
visit_pipeline_quota_page
page
.
within
(
'.pipeline-quota'
)
do
page
.
within
(
'.pipeline-quota'
)
do
expect
(
page
).
to
have_content
(
"300 / Unlimited minutes"
)
expect
(
page
).
to
have_content
(
"300 / Unlimited minutes"
)
expect
(
page
).
to
have_selector
(
'.progress-bar-success'
)
expect
(
page
).
to
have_selector
(
'.progress-bar-success'
)
end
end
page
.
within
(
'.pipeline-project-metrics'
)
do
expect
(
page
).
to
have_content
(
'This group has no projects which use shared runners'
)
end
end
end
end
end
...
@@ -64,7 +68,7 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -64,7 +68,7 @@ feature 'Groups > Pipeline Quota', feature: true do
end
end
end
end
it
'shows correct
ratio and status
'
do
it
'shows correct
group quota info
'
do
visit_pipeline_quota_page
visit_pipeline_quota_page
page
.
within
(
'.pipeline-quota'
)
do
page
.
within
(
'.pipeline-quota'
)
do
...
@@ -77,6 +81,7 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -77,6 +81,7 @@ feature 'Groups > Pipeline Quota', feature: true do
context
'minutes over quota'
do
context
'minutes over quota'
do
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let!
(
:other_project
)
{
create
(
:empty_project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
it
'is linked within the group settings dropdown'
do
it
'is linked within the group settings dropdown'
do
visit
group_path
(
group
)
visit
group_path
(
group
)
...
@@ -86,7 +91,7 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -86,7 +91,7 @@ feature 'Groups > Pipeline Quota', feature: true do
end
end
end
end
it
'shows correct
ratio and status
'
do
it
'shows correct
group quota and projects info
'
do
visit_pipeline_quota_page
visit_pipeline_quota_page
page
.
within
(
'.pipeline-quota'
)
do
page
.
within
(
'.pipeline-quota'
)
do
...
@@ -94,6 +99,11 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -94,6 +99,11 @@ feature 'Groups > Pipeline Quota', feature: true do
expect
(
page
).
to
have_content
(
"200% used"
)
expect
(
page
).
to
have_content
(
"200% used"
)
expect
(
page
).
to
have_selector
(
'.progress-bar-danger'
)
expect
(
page
).
to
have_selector
(
'.progress-bar-danger'
)
end
end
page
.
within
(
'.pipeline-project-metrics'
)
do
expect
(
page
).
to
have_content
(
project
.
name
)
expect
(
page
).
not_to
have_content
(
other_project
.
name
)
end
end
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