Commit 5fd19ee1 authored by Alper Akgun's avatar Alper Akgun Committed by Jacques Erasmus

Hand raise lead modal placeholder

parent 9be3299a
......@@ -66,6 +66,9 @@
- show_upgrade_button = show_upgrade_button?(purchase_link.action, plan_offer_type)
.gl-min-h-7.gl-display-flex.gl-flex-wrap.gl-justify-content-end
- 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: { namespace_id: namespace.id, user_name: current_user.username } }
- else
= link_to s_('BillingPlan|Contact sales'), "#{contact_sales_url}?test=inappcontactsales#{plan.code}", class: ["btn gl-button", show_upgrade_button ? "btn-success-secondary" : "btn-success"], data: { 'track-action': 'click_button', 'track-label': 'contact_sales', 'track-property': plan.code }
- if show_upgrade_button
= link_to upgrade_button_text(plan_offer_type), plan_purchase_or_upgrade_url(namespace, plan), class: ["btn btn-success gl-button", upgrade_button_css_classes(namespace, plan, is_current), "gl-ml-3"], data: { 'track-action': 'click_button', 'track-label': 'upgrade', 'track-property': plan.code, qa_selector: "upgrade_to_#{plan.code}" }
......@@ -64,7 +64,9 @@ 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
......@@ -77,6 +79,20 @@ RSpec.describe 'Billing plan pages', :feature, :js do
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
page.within('.content') do
expect(page).to have_selector(".js-hand-raise-lead-button[data-namespace-id='#{namespace.id}'][data-user-name='#{user.username}']", visible: false)
end
end
end
end
shared_examples 'non-upgradable plan' do
before do
visit page_path
......
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