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
fd9597d4
Commit
fd9597d4
authored
Dec 19, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ci limit warnings to project pipelines page
parent
727818b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
5 deletions
+42
-5
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+4
-0
spec/features/ci_shared_runner_limits_spec.rb
spec/features/ci_shared_runner_limits_spec.rb
+38
-5
No files found.
app/views/projects/pipelines/index.html.haml
View file @
fd9597d4
-
@no_container
=
true
-
page_title
"Pipelines"
=
content_for
:flash_message
do
=
render
'shared/shared_runner_minutes_limit'
,
project:
@project
=
render
"projects/pipelines/head"
%div
{
class:
container_class
}
...
...
spec/features/ci_shared_runner_limits_spec.rb
View file @
fd9597d4
...
...
@@ -16,7 +16,12 @@ feature 'CI shared runner limits', feature: true do
context
'without limit'
do
scenario
'it does not display a warning message on project homepage'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit_project_home
expect_no_quota_exceeded_alert
end
scenario
'it does not display a warning message on pipelines page'
do
visit_project_pipelines
expect_no_quota_exceeded_alert
end
end
...
...
@@ -26,7 +31,12 @@ feature 'CI shared runner limits', feature: true do
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
scenario
'it displays a warning message on project homepage'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit_project_home
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their build minutes quota."
)
end
scenario
'it displays a warning message on pipelines page'
do
visit_project_pipelines
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their build minutes quota."
)
end
end
...
...
@@ -35,7 +45,12 @@ feature 'CI shared runner limits', feature: true do
let
(
:group
)
{
create
(
:group
,
:with_not_used_build_minutes_limit
)
}
scenario
'it does not display a warning message on project homepage'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit_project_home
expect_no_quota_exceeded_alert
end
scenario
'it does not display a warning message on pipelines page'
do
visit_project_pipelines
expect_no_quota_exceeded_alert
end
end
...
...
@@ -44,7 +59,12 @@ feature 'CI shared runner limits', feature: true do
let
(
:group
)
{
create
(
:group
,
:with_build_minutes_limit
)
}
scenario
'it does not display a warning message on project homepage'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit_project_home
expect_no_quota_exceeded_alert
end
scenario
'it does not display a warning message on pipelines page'
do
visit_project_pipelines
expect_no_quota_exceeded_alert
end
end
...
...
@@ -56,12 +76,25 @@ feature 'CI shared runner limits', feature: true do
context
'when limit is defined and limit is exceeded'
do
scenario
'it does not display a warning message on project homepage'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
visit_project_home
expect_no_quota_exceeded_alert
end
scenario
'it does not display a warning message on pipelines page'
do
visit_project_pipelines
expect_no_quota_exceeded_alert
end
end
end
def
visit_project_home
visit
namespace_project_path
(
project
.
namespace
,
project
)
end
def
visit_project_pipelines
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
end
def
expect_quota_exceeded_alert
(
message
=
nil
)
expect
(
page
).
to
have_selector
(
'.shared-runner-quota-message'
,
count:
1
)
expect
(
page
.
find
(
'.shared-runner-quota-message'
)).
to
have_content
(
message
)
unless
message
.
nil?
...
...
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