diff options
Diffstat (limited to 'qa/lib')
-rw-r--r-- | qa/lib/gitlab.rb | 29 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/subscription.rb | 9 | ||||
-rw-r--r-- | qa/lib/gitlab/page/admin/subscription.stub.rb | 216 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/welcome.rb | 13 | ||||
-rw-r--r-- | qa/lib/gitlab/page/main/welcome.stub.rb | 33 |
5 files changed, 277 insertions, 23 deletions
diff --git a/qa/lib/gitlab.rb b/qa/lib/gitlab.rb index 4418e51facb..8c33071633d 100644 --- a/qa/lib/gitlab.rb +++ b/qa/lib/gitlab.rb @@ -1,31 +1,14 @@ # frozen_string_literal: true require 'chemlab/library' +require 'zeitwerk' + +loader = Zeitwerk::Loader.new +loader.push_dir(__dir__) +loader.ignore("#{__dir__}/gitlab/**/*.stub.rb") # ignore page stubs +loader.setup # 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 end diff --git a/qa/lib/gitlab/page/admin/subscription.rb b/qa/lib/gitlab/page/admin/subscription.rb index 0f7c6b4c211..cdd9bb20b42 100644 --- a/qa/lib/gitlab/page/admin/subscription.rb +++ b/qa/lib/gitlab/page/admin/subscription.rb @@ -6,7 +6,16 @@ module Gitlab class Subscription < Chemlab::Page path '/admin/subscription' + p :plan + p :started + p :name + p :company + p :email + h2 :billable_users + h2 :maximum_users h2 :users_in_subscription + h2 :users_over_subscription + table :subscription_history end end end diff --git a/qa/lib/gitlab/page/admin/subscription.stub.rb b/qa/lib/gitlab/page/admin/subscription.stub.rb index 51f23e7f0d0..89d7bfb95d9 100644 --- a/qa/lib/gitlab/page/admin/subscription.stub.rb +++ b/qa/lib/gitlab/page/admin/subscription.stub.rb @@ -4,6 +4,174 @@ module Gitlab module Page module Admin module Subscription + # @note Defined as +p :plan+ + # @return [String] The text content or value of +plan+ + def plan + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.plan_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def plan_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_plan + # end + # @return [Boolean] true if the +plan+ element is present on the page + def plan? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :started+ + # @return [String] The text content or value of +started+ + def started + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.started_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def started_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_started + # end + # @return [Boolean] true if the +started+ element is present on the page + def started? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :name+ + # @return [String] The text content or value of +name+ + def name + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.name_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def name_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_name + # end + # @return [Boolean] true if the +name+ element is present on the page + def name? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :company+ + # @return [String] The text content or value of +company+ + def company + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.company_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def company_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_company + # end + # @return [Boolean] true if the +company+ element is present on the page + def company? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +p :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 + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.email_element).to exist + # end + # @return [Watir::P] The raw +P+ element + def email_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_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 +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::Subscription.perform do |subscription| + # expect(subscription.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::Subscription.perform do |subscription| + # expect(subscription).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 +h2 :maximum_users+ + # @return [String] The text content or value of +maximum_users+ + def maximum_users + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.maximum_users_element).to exist + # end + # @return [Watir::H2] The raw +H2+ element + def maximum_users_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_maximum_users + # end + # @return [Boolean] true if the +maximum_users+ element is present on the page + def maximum_users? + # This is a stub, used for indexing. The method is dynamically generated. + end + # @note Defined as +h2 :users_in_subscription+ # @return [String] The text content or value of +users_in_subscription+ def users_in_subscription @@ -27,6 +195,54 @@ module Gitlab def users_in_subscription? # This is a stub, used for indexing. The method is dynamically generated. end + + # @note Defined as +h2 :users_over_subscription+ + # @return [String] The text content or value of +users_over_subscription+ + def users_over_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_over_subscription_element).to exist + # end + # @return [Watir::H2] The raw +H2+ element + def users_over_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_over_subscription + # end + # @return [Boolean] true if the +users_over_subscription+ element is present on the page + def users_over_subscription? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +table :subscription_history+ + # @return [String] The text content or value of +subscription_history+ + def subscription_history + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Admin::Subscription.perform do |subscription| + # expect(subscription.subscription_history_element).to exist + # end + # @return [Watir::Table] The raw +Table+ element + def subscription_history_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_subscription_history + # end + # @return [Boolean] true if the +subscription_history+ element is present on the page + def subscription_history? + # This is a stub, used for indexing. The method is dynamically generated. + end end end end diff --git a/qa/lib/gitlab/page/main/welcome.rb b/qa/lib/gitlab/page/main/welcome.rb new file mode 100644 index 00000000000..a2df1da61c9 --- /dev/null +++ b/qa/lib/gitlab/page/main/welcome.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Main + class Welcome < Chemlab::Page + path '/users/sign_up/welcome' + + button :get_started_button + end + end + end +end diff --git a/qa/lib/gitlab/page/main/welcome.stub.rb b/qa/lib/gitlab/page/main/welcome.stub.rb new file mode 100644 index 00000000000..a10e697bcbf --- /dev/null +++ b/qa/lib/gitlab/page/main/welcome.stub.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Gitlab + module Page + module Main + module Welcome + # @note Defined as +button :get_started_button+ + # Clicks +get_started_button+ + def get_started_button + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Welcome.perform do |welcome| + # expect(welcome.get_started_button_element).to exist + # end + # @return [Watir::Button] The raw +Button+ element + def get_started_button_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Main::Welcome.perform do |welcome| + # expect(welcome).to be_get_started_button + # end + # @return [Boolean] true if the +get_started_button+ element is present on the page + def get_started_button? + # This is a stub, used for indexing. The method is dynamically generated. + end + end + end + end +end |