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
534ddb45
Commit
534ddb45
authored
Dec 01, 2021
by
Chloe Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update locators on usage quota page
Update spec to use new element
parent
444a076a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
20 deletions
+22
-20
ee/app/assets/javascripts/usage_quotas/storage/components/usage_statistics_card.vue
...usage_quotas/storage/components/usage_statistics_card.vue
+5
-1
ee/app/views/namespaces/pipelines_quota/_extra_shared_runners_minutes_quota.html.haml
...lines_quota/_extra_shared_runners_minutes_quota.html.haml
+1
-1
ee/app/views/namespaces/pipelines_quota/_list.haml
ee/app/views/namespaces/pipelines_quota/_list.haml
+1
-1
qa/lib/gitlab/page/group/settings/usage_quotas.rb
qa/lib/gitlab/page/group/settings/usage_quotas.rb
+8
-10
qa/qa/specs/features/ee/browser_ui/fulfillment/purchase/purchase_ci_spec.rb
...es/ee/browser_ui/fulfillment/purchase/purchase_ci_spec.rb
+7
-7
No files found.
ee/app/assets/javascripts/usage_quotas/storage/components/usage_statistics_card.vue
View file @
534ddb45
...
@@ -49,7 +49,11 @@ export default {
...
@@ -49,7 +49,11 @@ export default {
<span
class=
"gl-font-size-h-display gl-font-weight-bold"
>
/
</span>
<span
class=
"gl-font-size-h-display gl-font-weight-bold"
>
/
</span>
<gl-sprintf
:message=
"__('%
{size} %{unit}')">
<gl-sprintf
:message=
"__('%
{size} %{unit}')">
<template
#size
>
<template
#size
>
<span
class=
"gl-font-size-h-display gl-font-weight-bold"
>
{{
usageTotal
.
value
}}
</span>
<span
data-qa-selector=
"purchased_usage_total"
class=
"gl-font-size-h-display gl-font-weight-bold"
>
{{
usageTotal
.
value
}}
</span
>
</
template
>
</
template
>
<
template
#unit
>
<
template
#unit
>
<span
class=
"gl-font-lg gl-font-weight-bold"
>
{{
usageTotal
.
unit
}}
</span>
<span
class=
"gl-font-lg gl-font-weight-bold"
>
{{
usageTotal
.
unit
}}
</span>
...
...
ee/app/views/namespaces/pipelines_quota/_extra_shared_runners_minutes_quota.html.haml
View file @
534ddb45
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
.col-sm-6
.col-sm-6
%strong
%strong
=
_
(
"Additional minutes"
)
=
_
(
"Additional minutes"
)
%div
%div
{
data:
{
qa_selector:
"additional_ci_minutes"
}
}
=
ci_minutes_report
(
minutes_quota_presenter
.
purchased_minutes_report
)
=
ci_minutes_report
(
minutes_quota_presenter
.
purchased_minutes_report
)
minutes
minutes
=
link_to
sprite_icon
(
'question-o'
),
help_page_path
(
'subscriptions/gitlab_com/index'
,
anchor:
'purchase-additional-ci-minutes'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
=
link_to
sprite_icon
(
'question-o'
),
help_page_path
(
'subscriptions/gitlab_com/index'
,
anchor:
'purchase-additional-ci-minutes'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
...
...
ee/app/views/namespaces/pipelines_quota/_list.haml
View file @
534ddb45
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
=
last_reset
.
strftime
(
'%b %d, %Y'
)
=
last_reset
.
strftime
(
'%b %d, %Y'
)
-
else
-
else
=
s_
(
'UsageQuota|Current period usage'
)
=
s_
(
'UsageQuota|Current period usage'
)
%div
%div
{
data:
{
qa_selector:
"plan_ci_minutes"
}
}
=
ci_minutes_report
(
minutes_quota_presenter
.
monthly_minutes_report
)
=
ci_minutes_report
(
minutes_quota_presenter
.
monthly_minutes_report
)
minutes
minutes
=
link_to
sprite_icon
(
'question-o'
),
help_page_path
(
'user/admin_area/settings/continuous_integration'
,
anchor:
'shared-runners-pipeline-minutes-quota'
),
target:
'_blank'
,
'aria-label'
:
_
(
'Shared runners help link'
)
=
link_to
sprite_icon
(
'question-o'
),
help_page_path
(
'user/admin_area/settings/continuous_integration'
,
anchor:
'shared-runners-pipeline-minutes-quota'
),
target:
'_blank'
,
'aria-label'
:
_
(
'Shared runners help link'
)
...
...
qa/lib/gitlab/page/group/settings/usage_quotas.rb
View file @
534ddb45
...
@@ -9,21 +9,19 @@ module Gitlab
...
@@ -9,21 +9,19 @@ module Gitlab
link
:storage_tab
,
id:
'storage-quota'
link
:storage_tab
,
id:
'storage-quota'
link
:buy_ci_minutes
,
text:
'Buy additional minutes'
link
:buy_ci_minutes
,
text:
'Buy additional minutes'
link
:buy_storage
,
text:
/Purchase more storage/
link
:buy_storage
,
text:
/Purchase more storage/
strong
:additional_minutes
,
text:
'Additional minutes'
div
:plan_ci_minutes
strong
:plan_minutes
,
text:
'Current period usage'
div
:additional_ci_minutes
div
:purchased_usage
,
'data-testid'
:
'purchased-usage'
span
:purchased_usage_total
div
(
:plan_minutes_usage
)
{
plan_minutes_element
.
following_sibling
.
span
}
div
(
:additional_minutes_usage
)
{
additional_minutes_element
.
following_sibling
.
span
}
div
:ci_purchase_successful_alert
,
text:
/You have successfully purchased CI minutes/
div
:ci_purchase_successful_alert
,
text:
/You have successfully purchased CI minutes/
div
:storage_purchase_successful_alert
,
text:
/You have successfully purchased a storage/
div
:storage_purchase_successful_alert
,
text:
/You have successfully purchased a storage/
h4
:storage_available_alert
,
text:
/purchased storage is available/
h4
:storage_available_alert
,
text:
/purchased storage is available/
def
plan_
minutes
_limits
def
plan_
ci
_limits
plan_
minutes_usage
[
%r{([^/ ]+)$}
]
plan_
ci_minutes_element
.
span
.
text
[
%r{([^/ ]+)$}
]
end
end
def
additional_limits
def
additional_
ci_
limits
additional_
minutes_usage
[
%r{([^/ ]+)$}
]
additional_
ci_minutes_element
.
span
.
text
[
%r{([^/ ]+)$}
]
end
end
# Waits and Checks if storage available alert presents on the page
# Waits and Checks if storage available alert presents on the page
...
@@ -40,7 +38,7 @@ module Gitlab
...
@@ -40,7 +38,7 @@ module Gitlab
# @return [Float] Total purchased storage value in GiB
# @return [Float] Total purchased storage value in GiB
def
total_purchased_storage
def
total_purchased_storage
storage_available_alert_element
.
wait_until
(
&
:present?
)
storage_available_alert_element
.
wait_until
(
&
:present?
)
purchased_usage_
element
.
p
.
spans
[
3
].
text
.
to_f
purchased_usage_
total
.
to_f
end
end
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/fulfillment/purchase/purchase_ci_spec.rb
View file @
534ddb45
...
@@ -54,8 +54,8 @@ module QA
...
@@ -54,8 +54,8 @@ module QA
expected_minutes
=
CI_MINUTES
[
:ci_minutes
]
*
purchase_quantity
expected_minutes
=
CI_MINUTES
[
:ci_minutes
]
*
purchase_quantity
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
additional_minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
expect
{
usage_quota
.
additional_
ci_
minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
expect
(
usage_quota
.
additional_limits
).
to
eq
(
expected_minutes
.
to_s
)
expect
(
usage_quota
.
additional_
ci_
limits
).
to
eq
(
expected_minutes
.
to_s
)
end
end
end
end
end
end
...
@@ -83,10 +83,10 @@ module QA
...
@@ -83,10 +83,10 @@ module QA
plan_limits
=
ULTIMATE
[
:ci_minutes
]
plan_limits
=
ULTIMATE
[
:ci_minutes
]
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
additional_minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
expect
{
usage_quota
.
additional_
ci_
minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
aggregate_failures
do
aggregate_failures
do
expect
(
usage_quota
.
additional_limits
).
to
eq
(
expected_minutes
.
to_s
)
expect
(
usage_quota
.
additional_
ci_
limits
).
to
eq
(
expected_minutes
.
to_s
)
expect
(
usage_quota
.
plan_
minutes
_limits
).
to
eq
(
plan_limits
.
to_s
)
expect
(
usage_quota
.
plan_
ci
_limits
).
to
eq
(
plan_limits
.
to_s
)
end
end
end
end
end
end
...
@@ -108,8 +108,8 @@ module QA
...
@@ -108,8 +108,8 @@ module QA
expected_minutes
=
CI_MINUTES
[
:ci_minutes
]
*
purchase_quantity
*
2
expected_minutes
=
CI_MINUTES
[
:ci_minutes
]
*
purchase_quantity
*
2
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
ci_purchase_successful_alert?
}.
to
eventually_be_truthy
.
within
(
max_duration:
60
,
max_attempts:
30
)
expect
{
usage_quota
.
additional_minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
expect
{
usage_quota
.
additional_
ci_
minutes?
}.
to
eventually_be_truthy
.
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
expect
(
usage_quota
.
additional_limits
).
to
eq
(
expected_minutes
.
to_s
)
expect
{
usage_quota
.
additional_ci_limits
}.
to
eventually_eq
(
expected_minutes
.
to_s
).
within
(
max_duration:
120
,
max_attempts:
60
,
reload_page:
page
)
end
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