Commit 8179e0fe authored by Alper Akgun's avatar Alper Akgun

Improve skipped billing page hand raise spec

parent 158e643f
...@@ -210,11 +210,11 @@ export default { ...@@ -210,11 +210,11 @@ export default {
<gl-form-group <gl-form-group
:label="$options.i18n.firstNameLabel" :label="$options.i18n.firstNameLabel"
label-size="sm" label-size="sm"
label-for="firstName" label-for="first-name"
class="mr-3 w-50" class="mr-3 w-50"
> >
<gl-form-input <gl-form-input
id="first-Name" id="first-name"
v-model="firstName" v-model="firstName"
type="text" type="text"
class="form-control" class="form-control"
...@@ -224,11 +224,11 @@ export default { ...@@ -224,11 +224,11 @@ export default {
<gl-form-group <gl-form-group
:label="$options.i18n.lastNameLabel" :label="$options.i18n.lastNameLabel"
label-size="sm" label-size="sm"
label-for="lastName" label-for="last-name"
class="w-50" class="w-50"
> >
<gl-form-input <gl-form-input
id="last-Name" id="last-name"
v-model="lastName" v-model="lastName"
type="text" type="text"
class="form-control" class="form-control"
...@@ -240,7 +240,7 @@ export default { ...@@ -240,7 +240,7 @@ export default {
<gl-form-group <gl-form-group
:label="$options.i18n.companyNameLabel" :label="$options.i18n.companyNameLabel"
label-size="sm" label-size="sm"
label-for="companyName" label-for="company-name"
class="mr-3 w-50" class="mr-3 w-50"
> >
<gl-form-input <gl-form-input
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
<gl-form-group <gl-form-group
:label="$options.i18n.companySizeLabel" :label="$options.i18n.companySizeLabel"
label-size="sm" label-size="sm"
label-for="companySize" label-for="company-size"
class="w-50" class="w-50"
> >
<gl-form-select <gl-form-select
...@@ -271,7 +271,7 @@ export default { ...@@ -271,7 +271,7 @@ export default {
:label="$options.i18n.phoneNumberLabel" :label="$options.i18n.phoneNumberLabel"
label-size="sm" label-size="sm"
:description="$options.i18n.phoneNumberDescription" :description="$options.i18n.phoneNumberDescription"
label-for="phoneNumber" label-for="phone-number"
> >
<gl-form-input <gl-form-input
id="phone-number" id="phone-number"
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'Billing plan pages', :feature, :js do RSpec.describe 'Billing plan pages', :feature, :js do
include SubscriptionPortalHelpers include SubscriptionPortalHelpers
let(:user) { create(:user) } let(:user) { create(:user, first_name: 'James', last_name: 'Bond', organization: 'ACME') }
let(:namespace) { user.namespace } let(:namespace) { user.namespace }
let(:free_plan) { create(:free_plan) } let(:free_plan) { create(:free_plan) }
let(:bronze_plan) { create(:bronze_plan) } let(:bronze_plan) { create(:bronze_plan) }
...@@ -86,8 +86,15 @@ RSpec.describe 'Billing plan pages', :feature, :js do ...@@ -86,8 +86,15 @@ RSpec.describe 'Billing plan pages', :feature, :js do
end end
it 'displays the in-app hand raise lead' do it 'displays the in-app hand raise lead' do
skip "not supported for #{plan.name}" if plan.name == 'bronze' if namespace.group_namespace?
page.within('.content') do page.within('[data-testid="plan-card-premium"]') do
click_button 'Contact sales'
end
expect(page).to have_content('Contact our Sales team')
expect(page).to have_field('First Name', with: 'James')
expect(page).to have_field('Last Name', with: 'Bond')
expect(page).to have_field('Company Name', with: 'ACME')
else
expect(page).to have_selector(".js-hand-raise-lead-button[data-namespace-id='#{namespace.id}'][data-user-name='#{user.username}']", visible: false) 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
......
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