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:
Diffstat (limited to 'qa/lib')
-rw-r--r--qa/lib/gitlab/page/group/settings/billing.rb3
-rw-r--r--qa/lib/gitlab/page/group/settings/billing.stub.rb24
-rw-r--r--qa/lib/gitlab/page/group/settings/usage_quotas.rb25
-rw-r--r--qa/lib/gitlab/page/group/settings/usage_quotas.stub.rb144
-rw-r--r--qa/lib/gitlab/page/main/login.rb38
-rw-r--r--qa/lib/gitlab/page/main/login.stub.rb183
-rw-r--r--qa/lib/gitlab/page/main/sign_up.rb13
-rw-r--r--qa/lib/gitlab/page/subscriptions/new.rb4
-rw-r--r--qa/lib/gitlab/page/subscriptions/new.stub.rb82
9 files changed, 94 insertions, 422 deletions
diff --git a/qa/lib/gitlab/page/group/settings/billing.rb b/qa/lib/gitlab/page/group/settings/billing.rb
index 0d25a012db3..086cb42a778 100644
--- a/qa/lib/gitlab/page/group/settings/billing.rb
+++ b/qa/lib/gitlab/page/group/settings/billing.rb
@@ -11,13 +11,12 @@ module Gitlab
link :upgrade_to_ultimate
# Subscription details
- strong :subscription_header
+ h5 :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
diff --git a/qa/lib/gitlab/page/group/settings/billing.stub.rb b/qa/lib/gitlab/page/group/settings/billing.stub.rb
index c49d744d61f..9aa1a23ec14 100644
--- a/qa/lib/gitlab/page/group/settings/billing.stub.rb
+++ b/qa/lib/gitlab/page/group/settings/billing.stub.rb
@@ -197,30 +197,6 @@ module Gitlab
# 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
diff --git a/qa/lib/gitlab/page/group/settings/usage_quotas.rb b/qa/lib/gitlab/page/group/settings/usage_quotas.rb
index cdb0760ad9c..8ae9e8fd25a 100644
--- a/qa/lib/gitlab/page/group/settings/usage_quotas.rb
+++ b/qa/lib/gitlab/page/group/settings/usage_quotas.rb
@@ -6,14 +6,10 @@ module Gitlab
module Settings
class UsageQuotas < Chemlab::Page
# Seats section
- link :seats_tab
div :seats_in_use
p :seats_used
p :seats_owed
table :subscription_users
- div :pending_members_alert
- button :remove_user
- button :view_pending_approvals, text: /View pending approvals/
# Pipelines section
link :pipelines_tab
@@ -27,23 +23,17 @@ module Gitlab
link :purchase_more_storage
div :namespace_usage_total
div :group_usage_message
- div :dependency_proxy_usage
span :dependency_proxy_size
- div :container_registry_usage
- div :project
- div :storage_type_legend
- span :container_registry_size
- div :storage_purchased, 'data-testid': 'storage-purchased'
+ div :storage_purchased
div :storage_purchase_successful_alert, text: /You have successfully purchased a storage/
span :project_repository_size
- span :project_lfs_object_size
- span :project_build_artifact_size
- span :project_packages_size
span :project_wiki_size
span :project_snippets_size
span :project_containers_registry_size
# Pending members
+ button :view_pending_approvals, text: /View pending approvals/
+ div :pending_members_alert
div :pending_members
button :approve_member
button :confirm_member_approval, text: /^OK$/
@@ -62,15 +52,6 @@ module Gitlab
additional_ci_minutes?
end
- # Waits and Checks if storage project data loaded
- #
- # @return [Boolean] True if the alert presents, false if not after 5 second wait
- def project_storage_data_available?
- storage_type_legend_element.wait_until(timeout: 3, &:present?)
- rescue Watir::Wait::TimeoutError
- false
- end
-
# Returns total purchased storage value once it's ready on page
#
# @return [Float] Total purchased storage value in GiB
diff --git a/qa/lib/gitlab/page/group/settings/usage_quotas.stub.rb b/qa/lib/gitlab/page/group/settings/usage_quotas.stub.rb
index 8099d1cf53a..748c9a82d59 100644
--- a/qa/lib/gitlab/page/group/settings/usage_quotas.stub.rb
+++ b/qa/lib/gitlab/page/group/settings/usage_quotas.stub.rb
@@ -5,30 +5,6 @@ module Gitlab
module Group
module Settings
module UsageQuotas
- # @note Defined as +link :seats_tab+
- # Clicks +seats_tab+
- def seats_tab
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.seats_tab_element).to exist
- # end
- # @return [Watir::Link] The raw +Link+ element
- def seats_tab_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_seats_tab
- # end
- # @return [Boolean] true if the +seats_tab+ element is present on the page
- def seats_tab?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
# @note Defined as +div :seats_in_use+
# @return [String] The text content or value of +seats_in_use+
def seats_in_use
@@ -125,30 +101,6 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
- # @note Defined as +button :remove_user+
- # Clicks +remove_user+
- def remove_user
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.remove_user_element).to exist
- # end
- # @return [Watir::Button] The raw +Button+ element
- def remove_user_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_remove_user
- # end
- # @return [Boolean] true if the +remove_user+ element is present on the page
- def remove_user?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
# @note Defined as +link :pipelines_tab+
# Clicks +pipelines_tab+
def pipelines_tab
@@ -365,30 +317,6 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
- # @note Defined as +div :dependency_proxy_usage+
- # @return [String] The text content or value of +dependency_proxy_usage+
- def dependency_proxy_usage
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.dependency_proxy_usage_element).to exist
- # end
- # @return [Watir::Div] The raw +Div+ element
- def dependency_proxy_usage_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_dependency_proxy_usage
- # end
- # @return [Boolean] true if the +dependency_proxy_usage+ element is present on the page
- def dependency_proxy_usage?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
# @note Defined as +span :dependency_proxy_size+
# @return [String] The text content or value of +dependency_proxy_size+
def dependency_proxy_size
@@ -413,30 +341,6 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
- # @note Defined as +div :container_registry_usage+
- # @return [String] The text content or value of +container_registry_usage+
- def container_registry_usage
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.container_registry_usage_element).to exist
- # end
- # @return [Watir::Div] The raw +Div+ element
- def container_registry_usage_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_container_registry_usage
- # end
- # @return [Boolean] true if the +container_registry_usage+ element is present on the page
- def container_registry_usage?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
# @note Defined as +div :project_storage_used+
# @return [String] The text content or value of +project_storage_used+
def project_storage_used
@@ -485,54 +389,6 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
- # @note Defined as +div :storage_type_legend+
- # @return [String] The text content or value of +storage_type_legend+
- def storage_type_legend
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.storage_type_legend_element).to exist
- # end
- # @return [Watir::Div] The raw +Div+ element
- def storage_type_legend_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_storage_type_legend
- # end
- # @return [Boolean] true if the +storage_type_legend+ element is present on the page
- def storage_type_legend?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @note Defined as +span :container_registry_size+
- # @return [String] The text content or value of +container_registry_size+
- def container_registry_size
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas.container_registry_size_element).to exist
- # end
- # @return [Watir::Span] The raw +Span+ element
- def container_registry_size_element
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quotas|
- # expect(usage_quotas).to be_container_registry_size
- # end
- # @return [Boolean] true if the +container_registry_size+ element is present on the page
- def container_registry_size?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
# @note Defined as +div :storage_purchased+
# @return [String] The text content or value of +storage_purchased+
def storage_purchased
diff --git a/qa/lib/gitlab/page/main/login.rb b/qa/lib/gitlab/page/main/login.rb
deleted file mode 100644
index de05df1a086..00000000000
--- a/qa/lib/gitlab/page/main/login.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Page
- module Main
- class Login < Chemlab::Page
- path '/users/sign_in'
-
- text_field :login_field
- text_field :password_field
- button :sign_in_button
-
- 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
- end
-end
diff --git a/qa/lib/gitlab/page/main/login.stub.rb b/qa/lib/gitlab/page/main/login.stub.rb
deleted file mode 100644
index a819ca4bcc8..00000000000
--- a/qa/lib/gitlab/page/main/login.stub.rb
+++ /dev/null
@@ -1,183 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Page
- module Main
- module Login
- # @note Defined as +text_field :login_field+
- # @return [String] The text content or value of +login_field+
- def login_field
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # Set the value of login_field
- # @example
- # Gitlab::Page::Main::Login.perform do |login|
- # login.login_field = 'value'
- # end
- # @param value [String] The value to set.
- def login_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.login_field_element).to exist
- # end
- # @return [Watir::TextField] The raw +TextField+ element
- def login_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_login_field
- # end
- # @return [Boolean] true if the +login_field+ element is present on the page
- def login_field?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @note Defined as +text_field :password_field+
- # @return [String] The text content or value of +password_field+
- def password_field
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # Set the value of password_field
- # @example
- # Gitlab::Page::Main::Login.perform do |login|
- # login.password_field = 'value'
- # end
- # @param value [String] The value to set.
- def password_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_field_element).to exist
- # end
- # @return [Watir::TextField] The raw +TextField+ element
- def password_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_field
- # end
- # @return [Boolean] true if the +password_field+ element is present on the page
- def password_field?
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @note Defined as +button :sign_in_button+
- # Clicks +sign_in_button+
- def sign_in_button
- # This is a stub, used for indexing. The method is dynamically generated.
- end
-
- # @example
- # Gitlab::Page::Main::Login.perform do |login|
- # expect(login.sign_in_button_element).to exist
- # end
- # @return [Watir::Button] The raw +Button+ element
- def sign_in_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_sign_in_button
- # end
- # @return [Boolean] true if the +sign_in_button+ element is present on the page
- 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
-end
diff --git a/qa/lib/gitlab/page/main/sign_up.rb b/qa/lib/gitlab/page/main/sign_up.rb
index 85d7f482461..d4ae335babd 100644
--- a/qa/lib/gitlab/page/main/sign_up.rb
+++ b/qa/lib/gitlab/page/main/sign_up.rb
@@ -6,16 +6,15 @@ module Gitlab
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 :first_name, 'data-testid': 'new-user-first-name-field'
+ text_field :last_name, 'data-testid': 'new-user-last-name-field'
- text_field :username, 'data-qa-selector': 'new_user_username_field'
+ text_field :username, 'data-testid': 'new-user-username-field'
- text_field :email, 'data-qa-selector': 'new_user_email_field'
- text_field :password, 'data-qa-selector': 'new_user_password_field'
+ text_field :email, 'data-testid': 'new-user-email-field'
+ text_field :password, 'data-testid': 'new-user-password-field'
- button :register, 'data-qa-selector': 'new_user_register_button'
+ button :register, 'data-testid': 'new-user-register-button'
# Register a user
# @param [Resource::User] user the user to register
diff --git a/qa/lib/gitlab/page/subscriptions/new.rb b/qa/lib/gitlab/page/subscriptions/new.rb
index 6e3cb45fd29..95e5028f985 100644
--- a/qa/lib/gitlab/page/subscriptions/new.rb
+++ b/qa/lib/gitlab/page/subscriptions/new.rb
@@ -38,8 +38,8 @@ module Gitlab
button :confirm_purchase, text: /Confirm purchase/
# Order Summary
- div :selected_plan, 'data-testid': 'selected-plan'
- div :order_total, 'data-testid': 'total-amount'
+ div :selected_plan
+ div :total_amount
end
end
end
diff --git a/qa/lib/gitlab/page/subscriptions/new.stub.rb b/qa/lib/gitlab/page/subscriptions/new.stub.rb
index 93680ab95e0..a7f5d689838 100644
--- a/qa/lib/gitlab/page/subscriptions/new.stub.rb
+++ b/qa/lib/gitlab/page/subscriptions/new.stub.rb
@@ -86,6 +86,40 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
+ # @note Defined as +text_field :quantity+
+ # @return [String] The text content or value of +quantity+
+ def quantity
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # Set the value of quantity
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # new.quantity = 'value'
+ # end
+ # @param value [String] The value to set.
+ def quantity=(value)
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new.quantity_element).to exist
+ # end
+ # @return [Watir::TextField] The raw +TextField+ element
+ def quantity_element
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new).to be_quantity
+ # end
+ # @return [Boolean] true if the +quantity+ element is present on the page
+ def quantity?
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
# @note Defined as +button :continue_to_billing+
# Clicks +continue_to_billing+
def continue_to_billing
@@ -539,6 +573,54 @@ module Gitlab
def confirm_purchase?
# This is a stub, used for indexing. The method is dynamically generated.
end
+
+ # @note Defined as +div :selected_plan+
+ # @return [String] The text content or value of +selected_plan+
+ def selected_plan
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new.selected_plan_element).to exist
+ # end
+ # @return [Watir::Div] The raw +Div+ element
+ def selected_plan_element
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new).to be_selected_plan
+ # end
+ # @return [Boolean] true if the +selected_plan+ element is present on the page
+ def selected_plan?
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @note Defined as +div :total_amount+
+ # @return [String] The text content or value of +total_amount+
+ def total_amount
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new.total_amount_element).to exist
+ # end
+ # @return [Watir::Div] The raw +Div+ element
+ def total_amount_element
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
+
+ # @example
+ # Gitlab::Page::Subscriptions::New.perform do |new|
+ # expect(new).to be_total_amount
+ # end
+ # @return [Boolean] true if the +total_amount+ element is present on the page
+ def total_amount?
+ # This is a stub, used for indexing. The method is dynamically generated.
+ end
end
end
end