From 4bb797f25563205cf495f4dd5366e037e88831ab Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 24 Oct 2023 18:11:45 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- qa/lib/gitlab/page/subscriptions/new.rb | 15 +++++++++++++++ qa/lib/gitlab/page/subscriptions/new.stub.rb | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) (limited to 'qa/lib') diff --git a/qa/lib/gitlab/page/subscriptions/new.rb b/qa/lib/gitlab/page/subscriptions/new.rb index 95e5028f985..739efeed898 100644 --- a/qa/lib/gitlab/page/subscriptions/new.rb +++ b/qa/lib/gitlab/page/subscriptions/new.rb @@ -40,6 +40,21 @@ module Gitlab # Order Summary div :selected_plan div :total_amount + + # Alerts + div :lock_competition_error, text: /Operation failed due to a lock competition, please retry later./ + + def purchase + ::QA::Support::Retrier.retry_until( + max_duration: 60, + sleep_interval: 10, + message: 'Expected no Zuora lock competition error' + ) do + confirm_purchase + ::QA::Support::WaitForRequests.wait_for_requests + !lock_competition_error? + end + end end end end diff --git a/qa/lib/gitlab/page/subscriptions/new.stub.rb b/qa/lib/gitlab/page/subscriptions/new.stub.rb index a7f5d689838..e660d198478 100644 --- a/qa/lib/gitlab/page/subscriptions/new.stub.rb +++ b/qa/lib/gitlab/page/subscriptions/new.stub.rb @@ -621,6 +621,30 @@ module Gitlab def total_amount? # This is a stub, used for indexing. The method is dynamically generated. end + + # @note Defined as +div :lock_competition_error+ + # @return [String] The text content or value of +lock_competition_error+ + def lock_competition_error + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new.lock_competition_error_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def lock_competition_error_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_lock_competition_error + # end + # @return [Boolean] true if the +lock_competition_error+ element is present on the page + def lock_competition_error? + # This is a stub, used for indexing. The method is dynamically generated. + end end end end -- cgit v1.2.3