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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-08 03:11:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-08 03:11:52 +0300
commit61f4111a853b8bb50f10fbd7854a8796be7eca24 (patch)
treed8a8a644de7d67bbaf1cfb899ec39973ac8a0ce3 /qa/lib/gitlab
parent4fcfdad283a25ee4d1e955954aeceb08d7ffd5f7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/lib/gitlab')
-rw-r--r--qa/lib/gitlab/page/admin/dashboard.rb15
-rw-r--r--qa/lib/gitlab/page/admin/dashboard.stub.rb81
-rw-r--r--qa/lib/gitlab/page/admin/subscription.rb13
-rw-r--r--qa/lib/gitlab/page/admin/subscription.stub.rb33
-rw-r--r--qa/lib/gitlab/page/main/sign_up.rb36
-rw-r--r--qa/lib/gitlab/page/main/sign_up.stub.rb203
6 files changed, 381 insertions, 0 deletions
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/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