diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /qa/lib | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'qa/lib')
-rw-r--r-- | qa/lib/gitlab/page/group/settings/billing.rb | 27 | ||||
-rw-r--r-- | qa/lib/gitlab/page/group/settings/billing.stub.rb | 216 | ||||
-rw-r--r-- | qa/lib/gitlab/page/group/settings/usage_quotas.rb | 2 |
3 files changed, 239 insertions, 6 deletions
diff --git a/qa/lib/gitlab/page/group/settings/billing.rb b/qa/lib/gitlab/page/group/settings/billing.rb index 24d327502f8..d0d73278890 100644 --- a/qa/lib/gitlab/page/group/settings/billing.rb +++ b/qa/lib/gitlab/page/group/settings/billing.rb @@ -5,13 +5,30 @@ module Gitlab module Group module Settings class Billing < Chemlab::Page - # TODO: Supplant with data-qa-selectors - h4 :billing_plan_header, css: 'div.billing-plan-header h4' - + h4 :billing_plan_header link :start_your_free_trial + link :upgrade_to_premium + link :upgrade_to_ultimate + + # Subscription details + strong :subscription_header + button :refresh_seats + + # Usage + p :seats_in_subscription + p :seats_currently_in_use + link :see_seats_usage + p :max_seats_used + p :seats_owed + + # Billing + p :subscription_start_date + p :subscription_end_date - link :upgrade_to_premium, css: '[data-testid="plan-card-premium"] a.billing-cta-purchase-new' - link :upgrade_to_ultimate, css: '[data-testid="plan-card-ultimate"] a.billing-cta-purchase-new' + def refresh_subscription_seats + refresh_seats + ::QA::Support::WaitForRequests.wait_for_requests + end end end end diff --git a/qa/lib/gitlab/page/group/settings/billing.stub.rb b/qa/lib/gitlab/page/group/settings/billing.stub.rb index 64176af794a..c49d744d61f 100644 --- a/qa/lib/gitlab/page/group/settings/billing.stub.rb +++ b/qa/lib/gitlab/page/group/settings/billing.stub.rb @@ -100,6 +100,222 @@ module Gitlab def upgrade_to_ultimate? # This is a stub, used for indexing. The method is dynamically generated. end + + # @note Defined as +strong :subscription_header+ + # @return [String] The text content or value of +subscription_header+ + def subscription_header + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.subscription_header_element).to exist + # end + # @return [Watir::Strong] The raw +Strong+ element + def subscription_header_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_subscription_header + # end + # @return [Boolean] true if the +subscription_header+ element is present on the page + def subscription_header? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +button :refresh_seats+ + # Clicks +refresh_seats+ + def refresh_seats + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.refresh_seats_element).to exist + # end + # @return [Watir::Button] The raw +Button+ element + def refresh_seats_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_refresh_seats + # end + # @return [Boolean] true if the +refresh_seats+ element is present on the page + def refresh_seats? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :seats_in_subscription+ + # @return [String] The text content or value of +seats_in_subscription+ + def seats_in_subscription + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.seats_in_subscription_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def seats_in_subscription_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_seats_in_subscription + # end + # @return [Boolean] true if the +seats_in_subscription+ element is present on the page + def seats_in_subscription? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :seats_currently_in_use+ + # @return [String] The text content or value of +seats_currently_in_use+ + def seats_currently_in_use + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.seats_currently_in_use_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def seats_currently_in_use_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_seats_currently_in_use + # end + # @return [Boolean] true if the +seats_currently_in_use+ element is present on the page + def seats_currently_in_use? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +link :see_seats_usage+ + # Clicks +see_seats_usage+ + def see_seats_usage + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.see_seats_usage_element).to exist + # end + # @return [Watir::Link] The raw +Link+ element + def see_seats_usage_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_see_seats_usage + # end + # @return [Boolean] true if the +see_seats_usage+ element is present on the page + def see_seats_usage? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :max_seats_used+ + # @return [String] The text content or value of +max_seats_used+ + def max_seats_used + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.max_seats_used_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def max_seats_used_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_max_seats_used + # end + # @return [Boolean] true if the +max_seats_used+ element is present on the page + def max_seats_used? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :seats_owed+ + # @return [String] The text content or value of +seats_owed+ + def seats_owed + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.seats_owed_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def seats_owed_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_seats_owed + # end + # @return [Boolean] true if the +seats_owed+ element is present on the page + def seats_owed? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :subscription_start_date+ + # @return [String] The text content or value of +subscription_start_date+ + def subscription_start_date + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.subscription_start_date_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def subscription_start_date_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_subscription_start_date + # end + # @return [Boolean] true if the +subscription_start_date+ element is present on the page + def subscription_start_date? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :subscription_end_date+ + # @return [String] The text content or value of +subscription_end_date+ + def subscription_end_date + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing.subscription_end_date_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def subscription_end_date_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::Billing.perform do |billing| + # expect(billing).to be_subscription_end_date + # end + # @return [Boolean] true if the +subscription_end_date+ element is present on the page + def subscription_end_date? + # This is a stub, used for indexing. The method is dynamically generated. + end end end end diff --git a/qa/lib/gitlab/page/group/settings/usage_quotas.rb b/qa/lib/gitlab/page/group/settings/usage_quotas.rb index 0408668a81c..df12fe4076c 100644 --- a/qa/lib/gitlab/page/group/settings/usage_quotas.rb +++ b/qa/lib/gitlab/page/group/settings/usage_quotas.rb @@ -14,7 +14,7 @@ module Gitlab span :purchased_usage_total div :ci_purchase_successful_alert, text: /You have successfully purchased CI minutes/ div :storage_purchase_successful_alert, text: /You have successfully purchased a storage/ - h4 :storage_available_alert, text: /purchased storage is available/ + h2 :storage_available_alert, text: /purchased storage is available/ def plan_ci_limits plan_ci_minutes_element.span.text[%r{([^/ ]+)$}] |