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
e8efbd68
Commit
e8efbd68
authored
Aug 12, 2021
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for CI minutes analytics
parent
59b92d67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
ee/app/assets/javascripts/ci_minutes_usage/components/minutes_usage_project_chart.vue
..._minutes_usage/components/minutes_usage_project_chart.vue
+1
-1
ee/spec/features/ci/ci_minutes_spec.rb
ee/spec/features/ci/ci_minutes_spec.rb
+32
-0
No files found.
ee/app/assets/javascripts/ci_minutes_usage/components/minutes_usage_project_chart.vue
View file @
e8efbd68
...
...
@@ -78,7 +78,7 @@ export default {
<div>
<div
class=
"gl-display-flex gl-my-3"
>
<h5
class=
"gl-flex-grow-1"
>
{{
$options
.
USAGE_BY_PROJECT
}}
</h5>
<gl-dropdown
v-if=
"!isDataEmpty"
:text=
"selectedMonth"
>
<gl-dropdown
v-if=
"!isDataEmpty"
:text=
"selectedMonth"
data-testid=
"project-month-dropdown"
>
<gl-dropdown-item
v-for=
"(month, index) in months"
:key=
"index"
...
...
ee/spec/features/ci/ci_minutes_spec.rb
0 → 100644
View file @
e8efbd68
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'CI minutes'
,
:js
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
name:
'Project 1'
,
namespace:
user
.
namespace
)
}
def
create_ci_minutes_usage
(
minutes
,
date
)
create
(
:ci_namespace_monthly_usage
,
namespace:
user
.
namespace
,
amount_used:
minutes
,
date:
date
)
create
(
:ci_project_monthly_usage
,
project:
project
,
amount_used:
minutes
,
date:
date
)
end
before
do
create_ci_minutes_usage
(
50
,
Date
.
new
(
2021
,
5
,
1
))
create_ci_minutes_usage
(
60
,
Date
.
new
(
2021
,
6
,
1
))
sign_in
(
user
)
visit
profile_usage_quotas_path
end
it
'renders a dropdown with the months of available analytics'
do
wait_for_requests
page
.
find
(
'[data-testid="project-month-dropdown"]'
).
click
page
.
within
'[data-testid="project-month-dropdown"]'
do
expect
(
page
.
all
(
'.gl-new-dropdown-item'
).
size
).
to
eq
2
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