Commit 50d2d7f9 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Fix specs

parent bdb9a0bc
...@@ -34,7 +34,7 @@ const bindEvents = () => { ...@@ -34,7 +34,7 @@ const bindEvents = () => {
const $selectedTemplateText = $('.selected-template'); const $selectedTemplateText = $('.selected-template');
const $changeTemplateBtn = $('.change-template'); const $changeTemplateBtn = $('.change-template');
const $selectedIcon = $('.selected-icon svg'); const $selectedIcon = $('.selected-icon svg');
const $templateProjectNameInput = $('#template-project-name'); const $templateProjectNameInput = $('#template-project-name #project_path');
if ($newProjectForm.length !== 1) { if ($newProjectForm.length !== 1) {
return; return;
......
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility - visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
.row .row{ id: project_name_id }
.form-group.project-path.col-sm-6 .form-group.project-path.col-sm-6
= f.label :namespace_id, class: 'label-light' do = f.label :namespace_id, class: 'label-light' do
%span %span
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= f.label :path, class: 'label-light' do = f.label :path, class: 'label-light' do
%span %span
Project name Project name
= f.text_field :path, placeholder: "my-awesome-project", id: project_name_id, class: "form-control", tabindex: 2, autofocus: true, required: true = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true
- if current_user.can_create_group? - if current_user.can_create_group?
.help-block .help-block
Want to house several dependent projects under the same namespace? Want to house several dependent projects under the same namespace?
......
...@@ -9,7 +9,7 @@ feature 'New project' do ...@@ -9,7 +9,7 @@ feature 'New project' do
sign_in(user) sign_in(user)
end end
it 'shows "New project" page', js: true do it 'shows "New project" page', :js do
visit new_project_path visit new_project_path
expect(page).to have_content('Project path') expect(page).to have_content('Project path')
...@@ -25,7 +25,7 @@ feature 'New project' do ...@@ -25,7 +25,7 @@ feature 'New project' do
expect(page).to have_link('GitLab export') expect(page).to have_link('GitLab export')
end end
context 'Visibility level selector', js: true do context 'Visibility level selector', :js do
Gitlab::VisibilityLevel.options.each do |key, level| Gitlab::VisibilityLevel.options.each do |key, level|
it "sets selector to #{key}" do it "sets selector to #{key}" do
stub_application_setting(default_project_visibility: level) stub_application_setting(default_project_visibility: level)
...@@ -134,7 +134,7 @@ feature 'New project' do ...@@ -134,7 +134,7 @@ feature 'New project' do
end end
end end
context 'Import project options', js: true do context 'Import project options', :js do
before do before do
visit new_project_path visit new_project_path
find('#import-project-tab').trigger('click') find('#import-project-tab').trigger('click')
......
...@@ -12,7 +12,7 @@ feature 'Project' do ...@@ -12,7 +12,7 @@ feature 'Project' do
visit new_project_path visit new_project_path
end end
it "allows creation from templates", js: true do it "allows creation from templates", :js do
find('#create-from-template-tab').trigger('click') find('#create-from-template-tab').trigger('click')
find("##{template.name}").trigger('click') find("##{template.name}").trigger('click')
fill_in("project_path", with: template.name) fill_in("project_path", with: template.name)
......
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