diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /qa/lib | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) | |
download | gitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'qa/lib')
-rw-r--r-- | qa/lib/gitlab.rb | 11 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/dashboard.rb | 15 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/dashboard.stub.rb | 81 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/subscription.rb | 13 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/subscription.stub.rb | 33 | ||||
-rw-r--r-- | qa/lib/gitlab/page/group/settings/usage_quota.stub.rb | 227 | ||||
-rw-r--r-- | qa/lib/gitlab/page/group/settings/usage_quotas.rb | 27 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/login.rb | 18 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/login.stub.rb | 82 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/sign_up.rb | 36 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/sign_up.stub.rb | 203 | ||||
-rw-r--r-- | qa/lib/gitlab/page/subscriptions/new.rb | 7 |
12 files changed, 751 insertions, 2 deletions
diff --git a/qa/lib/gitlab.rb b/qa/lib/gitlab.rb index d0d1d535114..4418e51facb 100644 --- a/qa/lib/gitlab.rb +++ b/qa/lib/gitlab.rb @@ -1,19 +1,30 @@ # frozen_string_literal: true +require 'chemlab/library' + # Chemlab Page Libraries for GitLab module Gitlab + include Chemlab::Library + module Page module Main autoload :Login, 'gitlab/page/main/login' + autoload :SignUp, 'gitlab/page/main/sign_up' end module Subscriptions autoload :New, 'gitlab/page/subscriptions/new' end + module Admin + autoload :Dashboard, 'gitlab/page/admin/dashboard' + autoload :Subscription, 'gitlab/page/admin/subscription' + end + module Group module Settings autoload :Billing, 'gitlab/page/group/settings/billing' + autoload :UsageQuotas, 'gitlab/page/group/settings/usage_quotas' end end end diff --git a/qa/lib/gitlab/page/admin/dashboard.rb b/qa/lib/gitlab/page/admin/dashboard.rb new file mode 100644 index 00000000000..f1a732f8fac --- /dev/null +++ b/qa/lib/gitlab/page/admin/dashboard.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Admin + class Dashboard < Chemlab::Page + path '/admin' + + h2 :users_in_license + h2 :billable_users + h3 :number_of_users + end + end + end +end diff --git a/qa/lib/gitlab/page/admin/dashboard.stub.rb b/qa/lib/gitlab/page/admin/dashboard.stub.rb new file mode 100644 index 00000000000..820acf79b9b --- /dev/null +++ b/qa/lib/gitlab/page/admin/dashboard.stub.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Admin + module Dashboard + # @note Defined as +h2 :users_in_license+ + # @return [String] The text content or value of +users_in_license+ + def users_in_license + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard.users_in_license_element).to exist + # end + # @return [Watir::H2] The raw +H2+ element + def users_in_license_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard).to be_users_in_license + # end + # @return [Boolean] true if the +users_in_license+ element is present on the page + def users_in_license? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +h2 :billable_users+ + # @return [String] The text content or value of +billable_users+ + def billable_users + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard.billable_users_element).to exist + # end + # @return [Watir::H2] The raw +H2+ element + def billable_users_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard).to be_billable_users + # end + # @return [Boolean] true if the +billable_users+ element is present on the page + def billable_users? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +h3 :number_of_users+ + # @return [String] The text content or value of +number_of_users+ + def number_of_users + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard.number_of_users_element).to exist + # end + # @return [Watir::H3] The raw +H3+ element + def number_of_users_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Dashboard.perform do |dashboard| + # expect(dashboard).to be_number_of_users + # end + # @return [Boolean] true if the +number_of_users+ element is present on the page + def number_of_users? + # This is a stub, used for indexing. The method is dynamically generated. + end + end + end + end +end diff --git a/qa/lib/gitlab/page/admin/subscription.rb b/qa/lib/gitlab/page/admin/subscription.rb new file mode 100644 index 00000000000..0f7c6b4c211 --- /dev/null +++ b/qa/lib/gitlab/page/admin/subscription.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Admin + class Subscription < Chemlab::Page + path '/admin/subscription' + + h2 :users_in_subscription + end + end + end +end diff --git a/qa/lib/gitlab/page/admin/subscription.stub.rb b/qa/lib/gitlab/page/admin/subscription.stub.rb new file mode 100644 index 00000000000..51f23e7f0d0 --- /dev/null +++ b/qa/lib/gitlab/page/admin/subscription.stub.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Admin + module Subscription + # @note Defined as +h2 :users_in_subscription+ + # @return [String] The text content or value of +users_in_subscription+ + def users_in_subscription + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.users_in_subscription_element).to exist + # end + # @return [Watir::H2] The raw +H2+ element + def users_in_subscription_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription).to be_users_in_subscription + # end + # @return [Boolean] true if the +users_in_subscription+ element is present on the page + def users_in_subscription? + # This is a stub, used for indexing. The method is dynamically generated. + end + end + end + end +end diff --git a/qa/lib/gitlab/page/group/settings/usage_quota.stub.rb b/qa/lib/gitlab/page/group/settings/usage_quota.stub.rb new file mode 100644 index 00000000000..192e71e6c90 --- /dev/null +++ b/qa/lib/gitlab/page/group/settings/usage_quota.stub.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Group + module Settings + module UsageQuota + # @note Defined as +link :pipeline_tab+ + # Clicks +pipeline_tab+ + def pipeline_tab + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.pipeline_tab_element).to exist + # end + # @return [Watir::Link] The raw +Link+ element + def pipeline_tab_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_pipeline_tab + # end + # @return [Boolean] true if the +pipeline_tab+ element is present on the page + def pipeline_tab? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +link :storage_tab+ + # Clicks +storage_tab+ + def storage_tab + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.storage_tab_element).to exist + # end + # @return [Watir::Link] The raw +Link+ element + def storage_tab_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_storage_tab + # end + # @return [Boolean] true if the +storage_tab+ element is present on the page + def storage_tab? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +link :buy_ci_minutes+ + # Clicks +buy_ci_minutes+ + def buy_ci_minutes + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.buy_ci_minutes_element).to exist + # end + # @return [Watir::Link] The raw +Link+ element + def buy_ci_minutes_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_buy_ci_minutes + # end + # @return [Boolean] true if the +buy_ci_minutes+ element is present on the page + def buy_ci_minutes? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +link :buy_storage+ + # Clicks +buy_storage+ + def buy_storage + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.buy_storage_element).to exist + # end + # @return [Watir::Link] The raw +Link+ element + def buy_storage_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_buy_storage + # end + # @return [Boolean] true if the +buy_storage+ element is present on the page + def buy_storage? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +strong :additional_minutes+ + # @return [String] The text content or value of +additional_minutes+ + def additional_minutes + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.additional_minutes_element).to exist + # end + # @return [Watir::Strong] The raw +Strong+ element + def additional_minutes_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_additional_minutes + # end + # @return [Boolean] true if the +additional_minutes+ element is present on the page + def additional_minutes? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +div :additional_minutes_usage+ + # @return [String] The text content or value of +additional_minutes_usage+ + def additional_minutes_usage + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.additional_minutes_usage_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def additional_minutes_usage_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_additional_minutes_usage + # end + # @return [Boolean] true if the +additional_minutes_usage+ element is present on the page + def additional_minutes_usage? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +strong :plan_minutes+ + # @return [String] The text content or value of +plan_minutes+ + def plan_minutes + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.plan_minutes_element).to exist + # end + # @return [Watir::Strong] The raw +Strong+ element + def plan_minutes_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_plan_minutes + # end + # @return [Boolean] true if the +plan_minutes+ element is present on the page + def plan_minutes? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +div :plan_minutes_usage+ + # @return [String] The text content or value of +plan_minutes_usage+ + def plan_minutes_usage + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.plan_minutes_usage_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def plan_minutes_usage_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_plan_minutes_usage + # end + # @return [Boolean] true if the +plan_minutes_usage+ element is present on the page + def plan_minutes_usage? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +div :purchase_successful_alert+ + # @return [String] The text content or value of +purchase_successful_alert+ + def purchase_successful_alert + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota.purchase_successful_alert_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def purchase_successful_alert_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Group::Settings::UsageQuota.perform do |usage_quota| + # expect(usage_quota).to be_purchase_successful_alert + # end + # @return [Boolean] true if the +purchase_successful_alert+ element is present on the page + def purchase_successful_alert? + # This is a stub, used for indexing. The method is dynamically generated. + end + end + 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 new file mode 100644 index 00000000000..455a695f703 --- /dev/null +++ b/qa/lib/gitlab/page/group/settings/usage_quotas.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module Gitlab + module Page + 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/ + strong :additional_minutes, text: 'Additional minutes' + div(:additional_minutes_usage) { additional_minutes_element.following_sibling.span } + div :purchase_successful_alert, text: /You have successfully purchased CI minutes/ + + def plan_minutes_limits + plan_minutes_usage[%r{([^/ ]+)$}] + end + + def additional_limits + additional_minutes_usage[%r{([^/ ]+)$}] + end + end + end + end + end +end diff --git a/qa/lib/gitlab/page/main/login.rb b/qa/lib/gitlab/page/main/login.rb index 9f20a040550..de05df1a086 100644 --- a/qa/lib/gitlab/page/main/login.rb +++ b/qa/lib/gitlab/page/main/login.rb @@ -10,11 +10,27 @@ module Gitlab text_field :password_field button :sign_in_button - def sign_in_as(username:, password:) + button :accept_terms, text: 'Accept terms' + + # password change tab + text_field :password_confirmation_field + button :change_password_button + + # Sign in using a given username and password + # @note this will also automatically accept terms if prompted + # @param [String] username the username to sign in with + # @param [String] password the password to sign in with + # @example + # Page::Main::Login.perform do |login| + # login.sign_in_as(username: 'username', password: 'password') + # login.sign_in_as(username: 'username', password: 'password', accept_terms: false) + # end + def sign_in_as(username:, password:, accept_terms: true) self.login_field = username self.password_field = password sign_in_button + self.accept_terms if accept_terms && accept_terms? end end end diff --git a/qa/lib/gitlab/page/main/login.stub.rb b/qa/lib/gitlab/page/main/login.stub.rb index a4cef291616..a819ca4bcc8 100644 --- a/qa/lib/gitlab/page/main/login.stub.rb +++ b/qa/lib/gitlab/page/main/login.stub.rb @@ -95,6 +95,88 @@ module Gitlab def sign_in_button? # This is a stub, used for indexing. The method is dynamically generated. end + + # @note Defined as +button :accept_terms+ + # Clicks +accept_terms+ + def accept_terms + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login.accept_terms_element).to exist + # end + # @return [Watir::Button] The raw +Button+ element + def accept_terms_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login).to be_accept_terms + # end + # @return [Boolean] true if the +accept_terms+ element is present on the page + def accept_terms? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +text_field :password_confirmation_field+ + # @return [String] The text content or value of +password_confirmation_field+ + def password_confirmation_field + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of password_confirmation_field + # @example + # Gitlab::Page::Main::Login.perform do |login| + # login.password_confirmation_field = 'value' + # end + # @param value [String] The value to set. + def password_confirmation_field=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login.password_confirmation_field_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def password_confirmation_field_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login).to be_password_confirmation_field + # end + # @return [Boolean] true if the +password_confirmation_field+ element is present on the page + def password_confirmation_field? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +button :change_password_button+ + # Clicks +change_password_button+ + def change_password_button + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login.change_password_button_element).to exist + # end + # @return [Watir::Button] The raw +Button+ element + def change_password_button_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Login.perform do |login| + # expect(login).to be_change_password_button + # end + # @return [Boolean] true if the +change_password_button+ element is present on the page + def change_password_button? + # This is a stub, used for indexing. The method is dynamically generated. + end end end end diff --git a/qa/lib/gitlab/page/main/sign_up.rb b/qa/lib/gitlab/page/main/sign_up.rb new file mode 100644 index 00000000000..85d7f482461 --- /dev/null +++ b/qa/lib/gitlab/page/main/sign_up.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Main + class SignUp < Chemlab::Page + path '/users/sign_up' + + # TODO: Refactor data-qa-selectors to be more terse + text_field :first_name, 'data-qa-selector': 'new_user_first_name_field' + text_field :last_name, 'data-qa-selector': 'new_user_last_name_field' + + text_field :username, 'data-qa-selector': 'new_user_username_field' + + text_field :email, 'data-qa-selector': 'new_user_email_field' + text_field :password, 'data-qa-selector': 'new_user_password_field' + + button :register, 'data-qa-selector': 'new_user_register_button' + + # Register a user + # @param [Resource::User] user the user to register + def register_user(user) + raise ArgumentError, 'User must be of type Resource::User' unless user.is_a? ::QA::Resource::User + + self.first_name = user.first_name + self.last_name = user.last_name + self.username = user.username + self.email = user.email + self.password = user.password + + self.register + end + end + end + end +end diff --git a/qa/lib/gitlab/page/main/sign_up.stub.rb b/qa/lib/gitlab/page/main/sign_up.stub.rb new file mode 100644 index 00000000000..881bd922c45 --- /dev/null +++ b/qa/lib/gitlab/page/main/sign_up.stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Main + module SignUp + # @note Defined as +text_field :first_name+ + # @return [String] The text content or value of +first_name+ + def first_name + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of first_name + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # sign_up.first_name = 'value' + # end + # @param value [String] The value to set. + def first_name=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.first_name_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def first_name_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_first_name + # end + # @return [Boolean] true if the +first_name+ element is present on the page + def first_name? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +text_field :last_name+ + # @return [String] The text content or value of +last_name+ + def last_name + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of last_name + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # sign_up.last_name = 'value' + # end + # @param value [String] The value to set. + def last_name=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.last_name_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def last_name_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_last_name + # end + # @return [Boolean] true if the +last_name+ element is present on the page + def last_name? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +text_field :username+ + # @return [String] The text content or value of +username+ + def username + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of username + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # sign_up.username = 'value' + # end + # @param value [String] The value to set. + def username=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.username_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def username_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_username + # end + # @return [Boolean] true if the +username+ element is present on the page + def username? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +text_field :email+ + # @return [String] The text content or value of +email+ + def email + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of email + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # sign_up.email = 'value' + # end + # @param value [String] The value to set. + def email=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.email_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def email_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_email + # end + # @return [Boolean] true if the +email+ element is present on the page + def email? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +text_field :password+ + # @return [String] The text content or value of +password+ + def password + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of password + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # sign_up.password = 'value' + # end + # @param value [String] The value to set. + def password=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.password_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def password_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_password + # end + # @return [Boolean] true if the +password+ element is present on the page + def password? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +button :register+ + # Clicks +register+ + def register + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up.register_element).to exist + # end + # @return [Watir::Button] The raw +Button+ element + def register_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::SignUp.perform do |sign_up| + # expect(sign_up).to be_register + # end + # @return [Boolean] true if the +register+ element is present on the page + def register? + # This is a stub, used for indexing. The method is dynamically generated. + end + end + end + end +end diff --git a/qa/lib/gitlab/page/subscriptions/new.rb b/qa/lib/gitlab/page/subscriptions/new.rb index 4c0e5446444..6e3cb45fd29 100644 --- a/qa/lib/gitlab/page/subscriptions/new.rb +++ b/qa/lib/gitlab/page/subscriptions/new.rb @@ -6,10 +6,11 @@ module Gitlab class New < Chemlab::Page path '/subscriptions/new' - # Subscription Details + # Purchase Details select :plan_name select :group_name text_field :number_of_users + text_field :quantity button :continue_to_billing, text: /Continue to billing/ # Billing address @@ -35,6 +36,10 @@ module Gitlab # Confirmation button :confirm_purchase, text: /Confirm purchase/ + + # Order Summary + div :selected_plan, 'data-testid': 'selected-plan' + div :order_total, 'data-testid': 'total-amount' end end end |