Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 14:10:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 14:10:13 +0300
commit0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch)
tree7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /qa/lib
parent72123183a20411a36d607d70b12d57c484394c8e (diff)
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'qa/lib')
-rw-r--r--qa/lib/gitlab/page/group/settings/usage_quotas.rb19
1 files changed, 13 insertions, 6 deletions
diff --git a/qa/lib/gitlab/page/group/settings/usage_quotas.rb b/qa/lib/gitlab/page/group/settings/usage_quotas.rb
index df12fe4076c..2b491188595 100644
--- a/qa/lib/gitlab/page/group/settings/usage_quotas.rb
+++ b/qa/lib/gitlab/page/group/settings/usage_quotas.rb
@@ -5,13 +5,15 @@ module Gitlab
module Group
module Settings
class UsageQuotas < Chemlab::Page
- link :pipeline_tab, id: 'pipelines-quota'
- link :storage_tab, id: 'storage-quota'
- link :buy_ci_minutes, text: 'Buy additional minutes'
- link :buy_storage, text: /Purchase more storage/
+ # TODO: Supplant with data-qa-selectors
+ link :pipelines_tab
+ link :storage_tab
+ link :buy_ci_minutes
+ link :buy_storage
div :plan_ci_minutes
div :additional_ci_minutes
span :purchased_usage_total
+ div :purchased_usage_total_free, 'data-testid': 'purchased-usage-card' # Different UI for free namespace
div :ci_purchase_successful_alert, text: /You have successfully purchased CI minutes/
div :storage_purchase_successful_alert, text: /You have successfully purchased a storage/
h2 :storage_available_alert, text: /purchased storage is available/
@@ -36,9 +38,14 @@ module Gitlab
# Returns total purchased storage value once it's ready on page
#
# @return [Float] Total purchased storage value in GiB
- def total_purchased_storage
+ def total_purchased_storage(free_name_space = true)
storage_available_alert_element.wait_until(&:present?)
- purchased_usage_total.to_f
+
+ if free_name_space
+ purchased_usage_total_free.split('/').last.match(/\d+\.\d+/)[0].to_f
+ else
+ purchased_usage_total.to_f
+ end
end
end
end