Commit 4f4e3f5f authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ebaque-update-cdot-staging-url' into 'master'

Feature flag to rollout new CustomersDot Staging URL

See merge request gitlab-org/gitlab!71827
parents 91d34066 1587d903
---
name: new_customersdot_staging_url
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71827
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/342513
milestone: '14.4'
type: development
group: group::fulfillment
default_enabled: false
......@@ -19,6 +19,7 @@ RSpec.describe 'Billing plan pages', :feature, :js do
stub_feature_flags(show_billing_eoa_banner: true)
stub_feature_flags(hide_deprecated_billing_plans: false)
stub_feature_flags(new_customersdot_staging_url: false)
stub_billing_plans(nil)
stub_billing_plans(namespace.id, plan.name, plans_data.to_json)
......
......@@ -71,6 +71,10 @@ RSpec.describe 'Groups > Billing', :js do
create(:gitlab_subscription, end_date: Date.today + 14.days, namespace: group, hosted_plan: bronze_plan, seats: 15)
end
before do
stub_feature_flags(new_customersdot_staging_url: false)
end
it_behaves_like 'hides search settings'
it 'shows the proper title and subscription data' do
......
......@@ -5,6 +5,10 @@ require 'spec_helper'
RSpec.describe BillingPlansHelper do
include Devise::Test::ControllerHelpers
before do
stub_feature_flags(new_customersdot_staging_url: false)
end
describe '#subscription_plan_data_attributes' do
let(:group) { build(:group) }
let(:customer_portal_url) { EE::SUBSCRIPTIONS_MANAGE_URL }
......
......@@ -3,7 +3,15 @@
module Gitlab
module SubscriptionPortal
def self.default_subscriptions_url
::Gitlab.dev_or_test_env? ? 'https://customers.stg.gitlab.com' : 'https://customers.gitlab.com'
if ::Gitlab.dev_or_test_env?
if Feature.enabled?(:new_customersdot_staging_url, default_enabled: :yaml)
'https://customers.staging.gitlab.com'
else
'https://customers.stg.gitlab.com'
end
else
'https://customers.gitlab.com'
end
end
def self.subscriptions_url
......
......@@ -9,6 +9,7 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
before do
stub_env('CUSTOMER_PORTAL_URL', env_value)
stub_feature_flags(new_customersdot_staging_url: false)
end
describe '.default_subscriptions_url' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment