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-05-17 00:09:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-17 00:09:09 +0300
commitcffe2c2c348d86d67298fa6516d49c36d696ab2d (patch)
tree9511c62edd677012325946d19e4d2df4a9733aa1 /qa/lib
parent7ff36fc6e9f0f5dffb41bfc79b4f07b2ce93e1c7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/lib')
-rw-r--r--qa/lib/gitlab/page/group/settings/billing.rb27
-rw-r--r--qa/lib/gitlab/page/group/settings/billing.stub.rb216
2 files changed, 238 insertions, 5 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