Commit 0505819a authored by Alper Akgun's avatar Alper Akgun

Merge branch '342727-improve-skipped-test' into 'master'

Improve skipped billing page hand raise spec

See merge request gitlab-org/gitlab!74438
parents 99c7c140 8179e0fe
......@@ -210,11 +210,11 @@ export default {
<gl-form-group
:label="$options.i18n.firstNameLabel"
label-size="sm"
label-for="firstName"
label-for="first-name"
class="mr-3 w-50"
>
<gl-form-input
id="first-Name"
id="first-name"
v-model="firstName"
type="text"
class="form-control"
......@@ -224,11 +224,11 @@ export default {
<gl-form-group
:label="$options.i18n.lastNameLabel"
label-size="sm"
label-for="lastName"
label-for="last-name"
class="w-50"
>
<gl-form-input
id="last-Name"
id="last-name"
v-model="lastName"
type="text"
class="form-control"
......@@ -240,7 +240,7 @@ export default {
<gl-form-group
:label="$options.i18n.companyNameLabel"
label-size="sm"
label-for="companyName"
label-for="company-name"
class="mr-3 w-50"
>
<gl-form-input
......@@ -254,7 +254,7 @@ export default {
<gl-form-group
:label="$options.i18n.companySizeLabel"
label-size="sm"
label-for="companySize"
label-for="company-size"
class="w-50"
>
<gl-form-select
......@@ -271,7 +271,7 @@ export default {
:label="$options.i18n.phoneNumberLabel"
label-size="sm"
:description="$options.i18n.phoneNumberDescription"
label-for="phoneNumber"
label-for="phone-number"
>
<gl-form-input
id="phone-number"
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'Billing plan pages', :feature, :js do
include SubscriptionPortalHelpers
let(:user) { create(:user) }
let(:user) { create(:user, first_name: 'James', last_name: 'Bond', organization: 'ACME') }
let(:namespace) { user.namespace }
let(:free_plan) { create(:free_plan) }
let(:bronze_plan) { create(:bronze_plan) }
......@@ -86,8 +86,15 @@ RSpec.describe 'Billing plan pages', :feature, :js do
end
it 'displays the in-app hand raise lead' do
skip "not supported for #{plan.name}" if plan.name == 'bronze'
page.within('.content') do
if namespace.group_namespace?
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)
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