2016-11-03 13:47:15 +00:00
|
|
|
require "spec_helper"
|
|
|
|
|
|
|
|
feature "New project", feature: true do
|
2017-01-30 17:43:13 +00:00
|
|
|
let(:user) { create(:admin) }
|
2016-11-03 13:47:15 +00:00
|
|
|
|
2017-01-30 17:43:13 +00:00
|
|
|
before do
|
|
|
|
login_as(user)
|
|
|
|
end
|
2016-11-03 13:47:15 +00:00
|
|
|
|
2017-01-30 17:43:13 +00:00
|
|
|
context "Visibility level selector" do
|
2016-11-03 13:47:15 +00:00
|
|
|
Gitlab::VisibilityLevel.options.each do |key, level|
|
|
|
|
it "sets selector to #{key}" do
|
|
|
|
stub_application_setting(default_project_visibility: level)
|
|
|
|
|
|
|
|
visit new_project_path
|
|
|
|
|
|
|
|
expect(find_field("project_visibility_level_#{level}")).to be_checked
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2017-01-30 17:43:13 +00:00
|
|
|
|
|
|
|
context 'Import project options' do
|
|
|
|
before do
|
|
|
|
visit new_project_path
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'does not autocomplete sensitive git repo URL' do
|
|
|
|
autocomplete = find('#project_import_url')['autocomplete']
|
|
|
|
|
|
|
|
expect(autocomplete).to eq('off')
|
|
|
|
end
|
|
|
|
end
|
2016-11-03 13:47:15 +00:00
|
|
|
end
|