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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-22 03:08:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-22 03:08:23 +0300
commitbd9b2731b4ea44168d67a6b38df4e6f0475cd90e (patch)
treeda397a913ff14c6d68e5fb8b27724b5f1eff6658 /qa
parentc097ca59a16661859dc192ca1c02c957c3025d46 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/lib/gitlab/page/admin/subscription.rb7
-rw-r--r--qa/qa/resource/user.rb14
2 files changed, 20 insertions, 1 deletions
diff --git a/qa/lib/gitlab/page/admin/subscription.rb b/qa/lib/gitlab/page/admin/subscription.rb
index b90a49abf4b..1538384f6ed 100644
--- a/qa/lib/gitlab/page/admin/subscription.rb
+++ b/qa/lib/gitlab/page/admin/subscription.rb
@@ -10,6 +10,8 @@ module Gitlab
text_field :activation_code
button :activate
label :terms_of_services, text: /I agree that/
+ link :remove_license, 'data-testid': 'license-remove-action'
+ button :confirm_ok_button
p :plan
p :started
p :name
@@ -21,6 +23,9 @@ module Gitlab
h2 :users_over_subscription
table :subscription_history
+ span :no_valid_license_alert, text: /no longer has a valid license/
+ h3 :no_active_subscription_title, text: /do not have an active subscription/
+
def accept_terms
terms_of_services_element.click # workaround for hidden checkbox
end
@@ -39,7 +44,7 @@ module Gitlab
# @param license_type [Hash] Type of the license
# @option license_type [String] 'license file'
# @option license_type [String] 'cloud license'
- # @return [Boolean] True if record exsists, false if not
+ # @return [Boolean] True if record exists, false if not
def has_subscription_record?(plan, users_in_license, license_type)
# find any records that have a matching plan and seats and type
subscription_history_element.hashes.any? do |record|
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index eab428a61e7..1b848feb50d 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -163,6 +163,20 @@ module QA
end
end
+ # Get users from the API
+ #
+ # @param [Integer] per_page the number of pages to traverse (used for pagination)
+ # @return [Array<Hash>] parsed response body
+ def self.all(per_page: 100)
+ response = nil
+ Resource::User.init do |user|
+ response = user.get(Runtime::API::Request.new(Runtime::API::Client.as_admin,
+ '/users',
+ per_page: per_page.to_s).url)
+ raise ResourceQueryError unless response.code == 200
+ end.parse_body(response)
+ end
+
def approve!
response = post(Runtime::API::Request.new(api_client, api_approve_path).url, nil)
return if response.code == 201