Commit e20bf374 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'onboarding-experiment-fix-group-path-autofill' into 'master'

Fix group path autofill

See merge request gitlab-org/gitlab!34934
parents 77291e34 fb658f86
......@@ -14,7 +14,7 @@
.form-group.group-name-holder.col-sm-12
= f.label :name, class: 'label-bold' do
= _('Group name (your organization)')
= f.text_field :name, class: 'form-control',
= f.text_field :name, class: 'form-control js-autofill-group-name',
required: true,
title: _('Please fill in a descriptive name for your group.'),
autofocus: true
......@@ -27,7 +27,8 @@
.group-root-path.input-group-prepend.has-tooltip{ title: root_url, :'data-placement' => 'bottom' }
.input-group-text
%span= root_url
= f.text_field :path, class: 'form-control js-validate-group-path',
= f.hidden_field :parent_id
= f.text_field :path, class: 'form-control js-validate-group-path js-autofill-group-path',
required: true,
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
title: _('Please choose a group URL with no special characters.')
......
......@@ -11,10 +11,14 @@ RSpec.describe 'New group screen', :js do
visit new_users_sign_up_group_path
end
subject { page }
it 'shows the progress bar with the correct steps' do
expect(subject).to have_content('Create your group')
expect(subject).to have_content('1. Your profile 2. Your GitLab group 3. Your first project')
expect(page).to have_content('Create your group')
expect(page).to have_content('1. Your profile 2. Your GitLab group 3. Your first project')
end
it 'autofills the group path' do
fill_in 'group_name', with: 'test'
expect(page).to have_field('group_path', with: 'test')
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