Commit c2c9a38f authored by Alper Akgun's avatar Alper Akgun

Remove in_app_hand_raise_pql PQL feature flags

parent cd135faa
......@@ -206,10 +206,6 @@ module ApplicationHelper
'https://' + promo_host
end
def contact_sales_url
promo_url + '/sales'
end
def support_url
Gitlab::CurrentSettings.current_application_settings.help_page_support_url.presence || promo_url + '/getting-help/'
end
......
......@@ -45,8 +45,6 @@ class TrialsController < ApplicationController
end
def create_hand_raise_lead
return render_404 unless Feature.enabled?(:in_app_hand_raise_pql, @namespace)
result = GitlabSubscriptions::CreateHandRaiseLeadService.new.execute(hand_raise_lead_params)
if result.success?
......
......@@ -152,16 +152,6 @@ module BillingPlansHelper
}
end
def contact_sales_button_data(plan)
data = {
track_action: 'click_button',
track_label: 'contact_sales',
track_property: plan.code
}
add_billing_in_side_nav_attribute(data)
end
def billing_upgrade_button_data(plan)
data = {
track_action: 'click_button',
......
- if show_contact_sales_button?(purchase_link.action, plan_offer_type)
- if Feature.enabled?(:in_app_hand_raise_pql, namespace)
.js-hand-raise-lead-button{ data: hand_raise_props(namespace) }
- else
= link_to s_('BillingPlan|Contact sales'),
"#{contact_sales_url}?test=inappcontactsales#{plan.code}",
class: ["btn gl-button", show_upgrade_button ? "btn-confirm-secondary" : "btn-confirm"],
data: contact_sales_button_data(plan)
- if show_upgrade_button
= link_to upgrade_button_text(plan_offer_type),
plan_purchase_or_upgrade_url(namespace, plan),
......
name: in_app_hand_raise_pql
introduced_by_url:
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334211
milestone: '14.4'
type: development
group: group::conversion
default_enabled: false
......@@ -284,8 +284,6 @@ RSpec.describe TrialsController, :saas do
end
before do
stub_feature_flags(in_app_hand_raise_pql: true)
allow_next_instance_of(GitlabSubscriptions::CreateHandRaiseLeadService) do |service|
allow(service).to receive(:execute).and_return(create_hand_raise_lead_result ? ServiceResponse.success : ServiceResponse.error(message: 'failed'))
end
......@@ -299,14 +297,6 @@ RSpec.describe TrialsController, :saas do
it { is_expected.to have_gitlab_http_status(:not_found) }
end
context 'when in_app_hand_raise_pql feature flag is disabled' do
before do
stub_feature_flags(in_app_hand_raise_pql: false)
end
it { is_expected.to have_gitlab_http_status(:not_found) }
end
context 'when cannot find the namespace' do
let(:namespace_id) { non_existing_record_id.to_s }
......
......@@ -64,28 +64,11 @@ RSpec.describe 'Billing plan pages', :feature, :js do
end
shared_examples 'can contact sales' do
context 'with in app hand raise feature flag off' do
before do
stub_feature_flags(in_app_hand_raise_pql: false)
visit page_path
end
it 'displays the contact sales link' do
# see ApplicationHelper#contact_sales_url
contact_sales_url = "https://#{ApplicationHelper.promo_host}/sales"
page.within('.content') do
expect(page).to have_link('Contact sales', href: %r{#{contact_sales_url}\?test=inappcontactsales(bronze|premium|gold)})
end
end
end
context 'with in app hand raise feature flag on' do
before do
stub_feature_flags(in_app_hand_raise_pql: namespace)
visit page_path
end
it 'displays the in-app hand raise lead' do
it 'displays the in-app hand raise lead', :aggregate_failures do
if namespace.group_namespace?
page.within('[data-testid="plan-card-premium"]') do
click_button 'Contact sales'
......@@ -99,7 +82,6 @@ RSpec.describe 'Billing plan pages', :feature, :js do
end
end
end
end
shared_examples 'non-upgradable plan' do
before do
......
......@@ -587,29 +587,6 @@ RSpec.describe BillingPlansHelper, :saas do
end
end
describe '#contact_sales_button_data' do
let(:plan) { double('Plan', code: '_code_') }
let(:data) do
{
track_action: 'click_button',
track_label: 'contact_sales',
track_property: plan.code
}
end
it 'has experiment attribute' do
allow(helper).to receive(:params).and_return({ from: 'side_nav' })
expect(helper.contact_sales_button_data(plan)).to eq data.merge(track_experiment: :billing_in_side_nav)
end
it 'does not have experiment attribute' do
allow(helper).to receive(:params).and_return({})
expect(helper.contact_sales_button_data(plan)).to eq data
end
end
describe '#billing_upgrade_button_data' do
let(:plan) { double('Plan', code: '_code_') }
let(:data) do
......
......@@ -5421,9 +5421,6 @@ msgstr ""
msgid "BillingPlans|per user"
msgstr ""
msgid "BillingPlan|Contact sales"
msgstr ""
msgid "BillingPlan|Upgrade"
msgstr ""
......
......@@ -192,20 +192,6 @@ RSpec.describe ApplicationHelper do
end
end
describe '#contact_sales_url' do
subject { helper.contact_sales_url }
it 'returns the url' do
is_expected.to eq("https://#{helper.promo_host}/sales")
end
it 'changes if promo_url changes' do
allow(helper).to receive(:promo_url).and_return('https://somewhere.else')
is_expected.to eq('https://somewhere.else/sales')
end
end
describe '#support_url' do
context 'when alternate support url is specified' do
let(:alternate_url) { 'http://company.example.com/getting-help' }
......
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