Commit f0603e4c authored by James Lopez's avatar James Lopez

added spec, fixed wording

parent 4eb9045d
......@@ -136,12 +136,12 @@
});
$('.btn_import_gitlab_project').attr('disabled',true)
$('.import_gitlab_project').attr('title', 'Project path required.');
$('.import_gitlab_project').attr('title', 'Project path and name required.');
$('.import_gitlab_project').click(function( event ) {
if($('.btn_import_gitlab_project').attr('disabled')) {
event.preventDefault();
new Flash("Please enter a path for the project to be imported to.");
new Flash("Please enter path and name for the project to be imported to.");
}
});
......@@ -152,7 +152,7 @@
$(".flash-container").html("")
} else {
$('.btn_import_gitlab_project').attr('disabled',true);
$('.import_gitlab_project').attr('title', 'Project path required.');
$('.import_gitlab_project').attr('title', 'Project path and name required.');
}
});
......
......@@ -59,6 +59,19 @@ feature 'project import', feature: true, js: true do
end
end
scenario 'project with no name' do
project = create(:project, namespace_id: 2)
visit new_project_path
select2('2', from: '#project_namespace_id')
click_link 'GitLab export'
page.within('.flash-container') do
expect(page).to have_content('Please enter path and name')
end
end
def wiki_exists?
wiki = ProjectWiki.new(project)
File.exist?(wiki.repository.path_to_repo) && !wiki.repository.empty?
......
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