diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 09:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 09:08:48 +0300 |
commit | 224d2fe16768ee5b270d894a5ed47101bf454d04 (patch) | |
tree | bbb284a9a23bc00b1b6583c266f711a9d845c4c0 /qa/lib/gitlab | |
parent | 5b20366d04e3c672a37954f2fc374ca81296c4c1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/lib/gitlab')
-rw-r--r-- | qa/lib/gitlab/page/group/settings/usage_quotas.rb | 13 |
1 files changed, 10 insertions, 3 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..d19b2e43119 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 + # TODO: Supplant with data-qa-selectors 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/ + link :buy_storage, text: /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 |