diff options
Diffstat (limited to 'qa/lib/gitlab')
-rw-r--r-- | qa/lib/gitlab/page/group/settings/usage_quotas.rb | 11 | ||||
-rw-r--r-- | qa/lib/gitlab/page/trials/new.rb | 20 | ||||
-rw-r--r-- | qa/lib/gitlab/page/trials/select.rb | 24 |
3 files changed, 47 insertions, 8 deletions
diff --git a/qa/lib/gitlab/page/group/settings/usage_quotas.rb b/qa/lib/gitlab/page/group/settings/usage_quotas.rb index 62f55aea2cc..3cb501efe13 100644 --- a/qa/lib/gitlab/page/group/settings/usage_quotas.rb +++ b/qa/lib/gitlab/page/group/settings/usage_quotas.rb @@ -32,8 +32,7 @@ module Gitlab div :project div :storage_type_legend span :container_registry_size - div :purchased_usage_total_free # Different UI for free namespace - span :purchased_usage_total + div :purchased_usage_total div :storage_purchase_successful_alert, text: /You have successfully purchased a storage/ div :additional_storage_alert, text: /purchase additional storage/ @@ -66,14 +65,10 @@ 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(free_name_space = true) + def total_purchased_storage additional_storage_alert_element.wait_until(&:present?) - if free_name_space - purchased_usage_total_free.split('/').last.match(/\d+\.\d+/)[0].to_f - else - purchased_usage_total.to_f - end + purchased_usage_total[/(\d+){2}.\d+/].to_f end def additional_ci_minutes_added? diff --git a/qa/lib/gitlab/page/trials/new.rb b/qa/lib/gitlab/page/trials/new.rb new file mode 100644 index 00000000000..b2e6cbdb682 --- /dev/null +++ b/qa/lib/gitlab/page/trials/new.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Trials + class New < Chemlab::Page + path '/-/trials/new' + + text_field :first_name + text_field :last_name + text_field :company_name + select :number_of_employees + text_field :telephone_number + select :country + select :state + button :continue + end + end + end +end diff --git a/qa/lib/gitlab/page/trials/select.rb b/qa/lib/gitlab/page/trials/select.rb new file mode 100644 index 00000000000..6eaf6003837 --- /dev/null +++ b/qa/lib/gitlab/page/trials/select.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Trials + class Select < Chemlab::Page + path '/-/trials/select' + + button :select_group, 'data-testid': 'base-dropdown-toggle' + div :group_dropdown, 'data-testid': 'base-dropdown-menu' + text_field :new_group_name + button :start_your_free_trial + radio :trial_company + radio :trial_individual + + def subscription_for=(group_name) + select_group + + group_dropdown_element.span(text: /#{group_name}/).click + end + end + end + end +end |