Skip to content
Snippets Groups Projects
Commit 1f5be253 authored by Zehua Zhang's avatar Zehua Zhang
Browse files

Fix JH skipped EE feature test about billings

parent 393b1303
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,6 +4,7 @@
 
RSpec.describe 'Billing plan pages', :feature, :saas, :js do
include SubscriptionPortalHelpers
include BillingPlansHelpers
 
let(:user) { create(:user, first_name: 'James', last_name: 'Bond', organization: 'ACME') }
let(:namespace) { user.namespace }
Loading
Loading
@@ -67,7 +68,7 @@ def external_upgrade_url(namespace, plan)
end
 
it 'does not render in-app hand raise lead' do
expect(page).to have_selector(".js-hand-raise-lead-button[data-namespace-id='#{namespace.id}'][data-user-name='#{user.username}']", visible: false)
should_have_hand_raise_lead_button
end
end
 
Loading
Loading
@@ -416,11 +417,7 @@ def external_upgrade_url(namespace, plan)
include_context 'hand raise lead form setup'
 
it 'displays the in-app hand raise lead' do
page.within('[data-testid="plan-card-premium"]') do
click_button 'Contact sales'
end
fill_hand_raise_lead_form_and_submit
click_premium_contact_sales_button_and_submit_form
end
end
 
Loading
Loading
# frozen_string_literal: true
# We write these in helper methods so that JH can override them
# Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/361718
module BillingPlansHelpers
def should_have_hand_raise_lead_button
expect(page).to have_selector(
".js-hand-raise-lead-button[data-namespace-id='#{namespace.id}'][data-user-name='#{user.username}']",
visible: false)
end
def click_premium_contact_sales_button_and_submit_form
page.within('[data-testid="plan-card-premium"]') do
click_button 'Contact sales'
end
fill_hand_raise_lead_form_and_submit
end
end
BillingPlansHelpers.prepend_mod
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment