From 6fd750c19206412cfc52b49a70b56147d839c52f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 10 Nov 2021 18:12:35 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- qa/lib/gitlab.rb | 29 ++++++----------------------- qa/lib/gitlab/page/main/welcome.rb | 13 +++++++++++++ qa/lib/gitlab/page/main/welcome.stub.rb | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 qa/lib/gitlab/page/main/welcome.rb create mode 100644 qa/lib/gitlab/page/main/welcome.stub.rb (limited to 'qa/lib') 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/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 -- cgit v1.2.3