Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
53e9274b
Commit
53e9274b
authored
Dec 23, 2021
by
Doug Stull
Committed by
Kushal Pandya
Dec 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove number of users from trial form
parent
32dd97c8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
11 additions
and
52 deletions
+11
-52
ee/app/controllers/registrations/groups_controller.rb
ee/app/controllers/registrations/groups_controller.rb
+0
-1
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+1
-1
ee/app/views/shared/groups/_trial_form.html.haml
ee/app/views/shared/groups/_trial_form.html.haml
+0
-4
ee/app/views/trials/new.html.haml
ee/app/views/trials/new.html.haml
+4
-8
ee/spec/controllers/registrations/groups_controller_spec.rb
ee/spec/controllers/registrations/groups_controller_spec.rb
+0
-1
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+0
-2
ee/spec/features/google_analytics_datalayer_spec.rb
ee/spec/features/google_analytics_datalayer_spec.rb
+5
-6
ee/spec/features/registrations/trial_during_signup_flow_spec.rb
...c/features/registrations/trial_during_signup_flow_spec.rb
+1
-2
ee/spec/features/trials/capture_lead_spec.rb
ee/spec/features/trials/capture_lead_spec.rb
+0
-18
locale/gitlab.pot
locale/gitlab.pot
+0
-6
qa/qa/page/trials/new.rb
qa/qa/page/trials/new.rb
+0
-1
qa/qa/specs/features/ee/browser_ui/11_fulfillment/purchase/free_trial_spec.rb
.../ee/browser_ui/11_fulfillment/purchase/free_trial_spec.rb
+0
-2
No files found.
ee/app/controllers/registrations/groups_controller.rb
View file @
53e9274b
...
@@ -77,7 +77,6 @@ module Registrations
...
@@ -77,7 +77,6 @@ module Registrations
:company_name
,
:company_name
,
:company_size
,
:company_size
,
:phone_number
,
:phone_number
,
:number_of_users
,
:country
:country
).
merge
(
).
merge
(
work_email:
current_user
.
email
,
work_email:
current_user
.
email
,
...
...
ee/app/controllers/trials_controller.rb
View file @
53e9274b
...
@@ -131,7 +131,7 @@ class TrialsController < ApplicationController
...
@@ -131,7 +131,7 @@ class TrialsController < ApplicationController
def
company_params
def
company_params
params
.
permit
(
:company_name
,
:company_size
,
:first_name
,
:last_name
,
:phone_number
,
params
.
permit
(
:company_name
,
:company_size
,
:first_name
,
:last_name
,
:phone_number
,
:
number_of_users
,
:
country
,
:glm_content
,
:glm_source
).
merge
(
extra_params
)
:country
,
:glm_content
,
:glm_source
).
merge
(
extra_params
)
end
end
def
extra_params
def
extra_params
...
...
ee/app/views/shared/groups/_trial_form.html.haml
View file @
53e9274b
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
.form-group.col-sm-12.gl-select2-html5-required-fix
.form-group.col-sm-12.gl-select2-html5-required-fix
=
label_tag
:company_size
,
s_
(
'Trial|Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
label_tag
:company_size
,
s_
(
'Trial|Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'js-trial-field select2'
,
required:
true
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'js-trial-field select2'
,
required:
true
.row
.form-group.col-sm-12
=
label_tag
:number_of_users
,
s_
(
'Trial|How many employees will use Gitlab?'
),
for: :number_of_users
,
class:
'col-form-label'
=
number_field_tag
:number_of_users
,
params
[
:number_of_users
],
class:
'form-control js-trial-field'
,
required:
true
,
min:
1
.row
.row
.form-group.col-sm-12
.form-group.col-sm-12
=
label_tag
:phone_number
,
s_
(
'Trial|Telephone number'
),
for: :phone_number
,
class:
'col-form-label'
=
label_tag
:phone_number
,
s_
(
'Trial|Telephone number'
),
for: :phone_number
,
class:
'col-form-label'
...
...
ee/app/views/trials/new.html.haml
View file @
53e9274b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
=
render
'errors'
=
render
'errors'
=
form_tag
create_lead_trials_path
(
glm_params
),
method: :post
,
id:
"new_trial"
do
|
f
|
=
form_tag
create_lead_trials_path
(
glm_params
),
method: :post
,
id:
"new_trial"
do
|
_
f
|
.form-row
.form-row
.col-12.col-sm-6.form-group
.col-12.col-sm-6.form-group
=
label_tag
:first_name
,
s_
(
'Trial|First name'
),
for: :first_name
,
class:
'col-form-label'
=
label_tag
:first_name
,
s_
(
'Trial|First name'
),
for: :first_name
,
class:
'col-form-label'
...
@@ -26,13 +26,9 @@
...
@@ -26,13 +26,9 @@
.form-group
.form-group
=
label_tag
:company_name
,
s_
(
'Trial|Company name'
),
for: :company_name
,
class:
'col-form-label'
=
label_tag
:company_name
,
s_
(
'Trial|Company name'
),
for: :company_name
,
class:
'col-form-label'
=
text_field_tag
:company_name
,
params
[
:company_name
]
||
current_user
.
organization
,
class:
'form-control gl-form-input'
,
required:
true
,
data:
{
qa_selector:
'company_name'
}
=
text_field_tag
:company_name
,
params
[
:company_name
]
||
current_user
.
organization
,
class:
'form-control gl-form-input'
,
required:
true
,
data:
{
qa_selector:
'company_name'
}
.form-row
.form-group.gl-select2-html5-required-fix
.col-12.col-sm-6.form-group.gl-select2-html5-required-fix
=
label_tag
:company_size
,
s_
(
'Trial|Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
label_tag
:company_size
,
s_
(
'Trial|Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'select2'
,
required:
true
,
data:
{
qa_selector:
'number_of_employees'
}
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'select2'
,
required:
true
,
data:
{
qa_selector:
'number_of_employees'
}
.col-12.col-sm-6.form-group
=
label_tag
:number_of_users
,
s_
(
'Trial|Number of trial users'
),
for: :number_of_users
,
class:
'col-form-label'
=
number_field_tag
:number_of_users
,
params
[
:number_of_users
],
class:
'form-control gl-border-gray-400'
,
required:
true
,
min:
1
,
data:
{
qa_selector:
'number_of_users'
}
.form-group.gl-select2-html5-required-fix
.form-group.gl-select2-html5-required-fix
=
render
'select_country'
=
render
'select_country'
.form-group
.form-group
...
...
ee/spec/controllers/registrations/groups_controller_spec.rb
View file @
53e9274b
...
@@ -129,7 +129,6 @@ RSpec.describe Registrations::GroupsController do
...
@@ -129,7 +129,6 @@ RSpec.describe Registrations::GroupsController do
company_name:
'ACME'
,
company_name:
'ACME'
,
company_size:
'1-99'
,
company_size:
'1-99'
,
phone_number:
'11111111'
,
phone_number:
'11111111'
,
number_of_users:
'17'
,
country:
'Norway'
country:
'Norway'
}
}
end
end
...
...
ee/spec/controllers/trials_controller_spec.rb
View file @
53e9274b
...
@@ -184,7 +184,6 @@ RSpec.describe TrialsController, :saas do
...
@@ -184,7 +184,6 @@ RSpec.describe TrialsController, :saas do
first_name:
user
.
first_name
,
first_name:
user
.
first_name
,
last_name:
user
.
last_name
,
last_name:
user
.
last_name
,
phone_number:
'1111111111'
,
phone_number:
'1111111111'
,
number_of_users:
'20'
,
country:
'IN'
,
country:
'IN'
,
glm_content:
'free-billing'
,
glm_content:
'free-billing'
,
glm_source:
'about.gitlab.com'
glm_source:
'about.gitlab.com'
...
@@ -210,7 +209,6 @@ RSpec.describe TrialsController, :saas do
...
@@ -210,7 +209,6 @@ RSpec.describe TrialsController, :saas do
first_name:
user
.
first_name
,
first_name:
user
.
first_name
,
last_name:
user
.
last_name
,
last_name:
user
.
last_name
,
phone_number:
'1111111111'
,
phone_number:
'1111111111'
,
number_of_users:
'20'
,
country:
'IN'
,
country:
'IN'
,
glm_content:
'free-billing'
,
glm_content:
'free-billing'
,
glm_source:
'about.gitlab.com'
,
glm_source:
'about.gitlab.com'
,
...
...
ee/spec/features/google_analytics_datalayer_spec.rb
View file @
53e9274b
...
@@ -4,7 +4,7 @@ require 'spec_helper'
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'GitLab.com Google Analytics DataLayer'
,
:js
do
RSpec
.
describe
'GitLab.com Google Analytics DataLayer'
,
:js
do
let!
(
:google_tag_manager_id
)
{
'GTM-WWKMTWS'
}
let!
(
:google_tag_manager_id
)
{
'GTM-WWKMTWS'
}
let!
(
:user_attrs
)
{
attributes_for
(
:user
,
first_name:
'GitLab'
,
last_name:
'GitLab'
,
company_name:
'GitLab'
,
phone_number:
'555-555-5555'
,
number_of_users:
10
)
}
let!
(
:user_attrs
)
{
attributes_for
(
:user
,
first_name:
'GitLab'
,
last_name:
'GitLab'
,
company_name:
'GitLab'
,
phone_number:
'555-555-5555'
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
...
@@ -71,12 +71,11 @@ RSpec.describe 'GitLab.com Google Analytics DataLayer', :js do
...
@@ -71,12 +71,11 @@ RSpec.describe 'GitLab.com Google Analytics DataLayer', :js do
evaluate_script
(
'document.getElementById("new_trial").addEventListener("submit", e => e.preventDefault())'
)
evaluate_script
(
'document.getElementById("new_trial").addEventListener("submit", e => e.preventDefault())'
)
fill_in
'first_name'
,
with:
user_attrs
[
:first_name
]
fill_in
'first_name'
,
with:
user_attrs
[
:first_name
]
fill_in
'last_name'
,
with:
user_attrs
[
:last_name
]
fill_in
'last_name'
,
with:
user_attrs
[
:last_name
]
fill_in
'company_name'
,
with:
user_attrs
[
:company_name
]
fill_in
'company_name'
,
with:
user_attrs
[
:company_name
]
evaluate_script
(
"document.getElementById('company_size').value = '1-99'"
)
evaluate_script
(
"document.getElementById('company_size').value = '1-99'"
)
fill_in
'phone_number'
,
with:
user_attrs
[
:phone_number
]
fill_in
'phone_number'
,
with:
user_attrs
[
:phone_number
]
fill_in
'number_of_users'
,
with:
user_attrs
[
:number_of_users
]
evaluate_script
(
"document.getElementById('country_select').value = 'US'"
)
evaluate_script
(
"document.getElementById('country_select').value = 'US'"
)
click_button
'Continue'
click_button
'Continue'
...
...
ee/spec/features/registrations/trial_during_signup_flow_spec.rb
View file @
53e9274b
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'User sees new onboarding flow'
,
:js
do
RSpec
.
describe
'User sees new onboarding flow'
,
:js
do
include
Select2Helper
include
Select2Helper
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:trial_fields
)
{
[
'Company name'
,
'Number of employees'
,
'
How many employees will use Gitlab?'
,
'
Telephone number'
,
'Country'
]
}
let_it_be
(
:trial_fields
)
{
[
'Company name'
,
'Number of employees'
,
'Telephone number'
,
'Country'
]
}
before
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
...
@@ -58,7 +58,6 @@ RSpec.describe 'User sees new onboarding flow', :js do
...
@@ -58,7 +58,6 @@ RSpec.describe 'User sees new onboarding flow', :js do
# submit the trial form
# submit the trial form
fill_in
'company_name'
,
with:
'GitLab'
fill_in
'company_name'
,
with:
'GitLab'
select2
'1-99'
,
from:
'#company_size'
select2
'1-99'
,
from:
'#company_size'
fill_in
'number_of_users'
,
with:
'1'
fill_in
'phone_number'
,
with:
'+1234567890'
fill_in
'phone_number'
,
with:
'+1234567890'
select2
'US'
,
from:
'#country_select'
select2
'US'
,
from:
'#country_select'
...
...
ee/spec/features/trials/capture_lead_spec.rb
View file @
53e9274b
...
@@ -29,7 +29,6 @@ RSpec.describe 'Trial Capture Lead', :js do
...
@@ -29,7 +29,6 @@ RSpec.describe 'Trial Capture Lead', :js do
fill_in
'company_name'
,
with:
'GitLab'
fill_in
'company_name'
,
with:
'GitLab'
select2
'1-99'
,
from:
'#company_size'
select2
'1-99'
,
from:
'#company_size'
fill_in
'phone_number'
,
with:
'+1 23 456-78-90'
fill_in
'phone_number'
,
with:
'+1 23 456-78-90'
fill_in
'number_of_users'
,
with:
'1'
select2
'US'
,
from:
'#country_select'
select2
'US'
,
from:
'#country_select'
click_button
'Continue'
click_button
'Continue'
...
@@ -43,14 +42,11 @@ RSpec.describe 'Trial Capture Lead', :js do
...
@@ -43,14 +42,11 @@ RSpec.describe 'Trial Capture Lead', :js do
before
do
before
do
fill_in
'company_name'
,
with:
'GitLab'
fill_in
'company_name'
,
with:
'GitLab'
select2
'1-99'
,
from:
'#company_size'
select2
'1-99'
,
from:
'#company_size'
fill_in
'number_of_users'
,
with:
'1'
select2
'US'
,
from:
'#country_select'
select2
'US'
,
from:
'#country_select'
end
end
context
'without phone number'
do
context
'without phone number'
do
it
'shows validation error'
do
it
'shows validation error'
do
fill_in
'number_of_users'
,
with:
'1'
click_button
'Continue'
click_button
'Continue'
message
=
page
.
find
(
'#phone_number'
).
native
.
attribute
(
'validationMessage'
)
message
=
page
.
find
(
'#phone_number'
).
native
.
attribute
(
'validationMessage'
)
...
@@ -62,7 +58,6 @@ RSpec.describe 'Trial Capture Lead', :js do
...
@@ -62,7 +58,6 @@ RSpec.describe 'Trial Capture Lead', :js do
context
'with invalid phone number format'
do
context
'with invalid phone number format'
do
it
'shows validation error'
do
it
'shows validation error'
do
fill_in
'number_of_users'
,
with:
'1'
invalid_phone_numbers
=
[
invalid_phone_numbers
=
[
'+1 (121) 22-12-23'
,
'+1 (121) 22-12-23'
,
'+12190AX '
,
'+12190AX '
,
...
@@ -82,19 +77,6 @@ RSpec.describe 'Trial Capture Lead', :js do
...
@@ -82,19 +77,6 @@ RSpec.describe 'Trial Capture Lead', :js do
end
end
end
end
end
end
context
'and enters negative number to the number of users field'
do
it
'shows validation error'
do
fill_in
'number_of_users'
,
with:
'-1'
click_button
'Continue'
message
=
page
.
find
(
'#number_of_users'
).
native
.
attribute
(
'validationMessage'
)
expect
(
message
).
to
eq
(
'Value must be greater than or equal to 1.'
)
expect
(
current_path
).
to
eq
(
new_trial_path
)
end
end
end
end
end
end
end
end
locale/gitlab.pot
View file @
53e9274b
...
@@ -37289,18 +37289,12 @@ msgstr ""
...
@@ -37289,18 +37289,12 @@ msgstr ""
msgid "Trial|GitLab Ultimate trial (optional)"
msgid "Trial|GitLab Ultimate trial (optional)"
msgstr ""
msgstr ""
msgid "Trial|How many employees will use Gitlab?"
msgstr ""
msgid "Trial|Last name"
msgid "Trial|Last name"
msgstr ""
msgstr ""
msgid "Trial|Number of employees"
msgid "Trial|Number of employees"
msgstr ""
msgstr ""
msgid "Trial|Number of trial users"
msgstr ""
msgid "Trial|Please select a country"
msgid "Trial|Please select a country"
msgstr ""
msgstr ""
...
...
qa/qa/page/trials/new.rb
View file @
53e9274b
...
@@ -12,7 +12,6 @@ module QA
...
@@ -12,7 +12,6 @@ module QA
text_field
:company_name
,
id:
'company_name'
text_field
:company_name
,
id:
'company_name'
select
:number_of_employees
,
id:
'company_size'
select
:number_of_employees
,
id:
'company_size'
text_field
:telephone_number
,
id:
'phone_number'
text_field
:telephone_number
,
id:
'phone_number'
text_field
:number_of_users
,
id:
'number_of_users'
select
:country
,
id:
'country_select'
select
:country
,
id:
'country_select'
...
...
qa/qa/specs/features/ee/browser_ui/11_fulfillment/purchase/free_trial_spec.rb
View file @
53e9274b
...
@@ -15,7 +15,6 @@ module QA
...
@@ -15,7 +15,6 @@ module QA
let
(
:company_name
)
{
'QA Test Company'
}
let
(
:company_name
)
{
'QA Test Company'
}
let
(
:number_of_employees
)
{
'500 - 1,999'
}
let
(
:number_of_employees
)
{
'500 - 1,999'
}
let
(
:telephone_number
)
{
'555-555-5555'
}
let
(
:telephone_number
)
{
'555-555-5555'
}
let
(
:number_of_users
)
{
600
}
let
(
:country
)
{
'United States of America'
}
let
(
:country
)
{
'United States of America'
}
let
(
:group
)
{
Resource
::
Group
.
fabricate_via_api!
}
let
(
:group
)
{
Resource
::
Group
.
fabricate_via_api!
}
...
@@ -46,7 +45,6 @@ module QA
...
@@ -46,7 +45,6 @@ module QA
new
.
company_name
=
company_name
new
.
company_name
=
company_name
new
.
number_of_employees
=
number_of_employees
new
.
number_of_employees
=
number_of_employees
new
.
telephone_number
=
telephone_number
new
.
telephone_number
=
telephone_number
new
.
number_of_users
=
number_of_users
new
.
country
=
country
new
.
country
=
country
new
.
continue
new
.
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment