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>2023-12-28 12:13:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-28 12:13:18 +0300
commit38b2e0d403a2f879ca714ebde61d0611305fbd99 (patch)
tree47967ed7efce26528cfa7b3774b25d0f34262103 /qa
parent3daa769462fb1ac2b3257604dc5551c181d408c9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/flow/purchase.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/qa/qa/flow/purchase.rb b/qa/qa/flow/purchase.rb
index a412539d3bd..5bd20e104c4 100644
--- a/qa/qa/flow/purchase.rb
+++ b/qa/qa/flow/purchase.rb
@@ -7,7 +7,7 @@ module QA
extend self
- def upgrade_subscription(plan: PREMIUM)
+ def upgrade_subscription(plan: PREMIUM, skip_contact: false)
Page::Group::Menu.perform(&:go_to_billing)
Gitlab::Page::Group::Settings::Billing.perform do |billing|
billing.send("upgrade_to_#{plan[:name].downcase}")
@@ -15,15 +15,12 @@ module QA
Gitlab::Page::Subscriptions::New.perform do |new_subscription|
new_subscription.continue_to_billing
-
- fill_in_customer_info
- fill_in_payment_info
-
+ fill_in_default_info(skip_contact)
new_subscription.purchase
end
end
- def purchase_compute_minutes(quantity: 1)
+ def purchase_compute_minutes(quantity: 1, skip_contact: false)
Page::Group::Menu.perform(&:go_to_usage_quotas)
Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quota|
usage_quota.pipelines_tab
@@ -34,14 +31,13 @@ module QA
compute_minutes.quantity = quantity
compute_minutes.continue_to_billing
- fill_in_customer_info
- fill_in_payment_info
+ fill_in_default_info(skip_contact)
compute_minutes.purchase
end
end
- def purchase_storage(quantity: 1)
+ def purchase_storage(quantity: 1, skip_contact: false)
Page::Group::Menu.perform(&:go_to_usage_quotas)
Gitlab::Page::Group::Settings::UsageQuotas.perform do |usage_quota|
usage_quota.storage_tab
@@ -56,8 +52,7 @@ module QA
storage.quantity = quantity
storage.continue_to_billing
- fill_in_customer_info
- fill_in_payment_info
+ fill_in_default_info(skip_contact)
storage.purchase
end
@@ -71,7 +66,6 @@ module QA
subscription.city = user_billing_info[:city]
subscription.state = user_billing_info[:state]
subscription.zip_code = user_billing_info[:zip]
- subscription.continue_to_payment
end
end
@@ -86,6 +80,14 @@ module QA
end
end
+ def fill_in_default_info(skip_contact)
+ Gitlab::Page::Subscriptions::New.perform do |subscription|
+ fill_in_customer_info unless skip_contact
+ subscription.continue_to_payment
+ fill_in_payment_info
+ end
+ end
+
def credit_card_info
{
name: 'QA Test',