summaryrefslogtreecommitdiff
path: root/spec/features/projects/import_export/import_file_spec.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2018-09-08 06:03:00 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-09-08 06:03:00 +0000
commit03ab130e4b112d51ce77260e54d42b44126426c7 (patch)
tree4009b561f17a300fa33a19872984fb7b54729c00 /spec/features/projects/import_export/import_file_spec.rb
parent1d69d26f9f4c950f7c42ad4a7de2f95e11475172 (diff)
downloadgitlab-ce-03ab130e4b112d51ce77260e54d42b44126426c7.tar.gz
Resolve "Create new project: Re-add project name field"
Diffstat (limited to 'spec/features/projects/import_export/import_file_spec.rb')
-rw-r--r--spec/features/projects/import_export/import_file_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb
index 2936482a1f7..6cd5810325f 100644
--- a/spec/features/projects/import_export/import_file_spec.rb
+++ b/spec/features/projects/import_export/import_file_spec.rb
@@ -20,6 +20,7 @@ describe 'Import/Export - project import integration test', :js do
context 'when selecting the namespace' do
let(:user) { create(:admin) }
let!(:namespace) { user.namespace }
+ let(:project_name) { 'Test Project Name' + SecureRandom.hex }
let(:project_path) { 'test-project-path' + SecureRandom.hex }
context 'prefilled the path' do
@@ -27,12 +28,13 @@ describe 'Import/Export - project import integration test', :js do
visit new_project_path
select2(namespace.id, from: '#project_namespace_id')
+ fill_in :project_name, with: project_name, visible: true
fill_in :project_path, with: project_path, visible: true
click_import_project_tab
click_link 'GitLab export'
expect(page).to have_content('Import an exported GitLab project')
- expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&path=#{project_path}")
+ expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&name=#{ERB::Util.url_encode(project_name)}&path=#{project_path}")
attach_file('file', file)
click_on 'Import project'
@@ -56,6 +58,7 @@ describe 'Import/Export - project import integration test', :js do
click_import_project_tab
click_link 'GitLab export'
+ fill_in :name, with: 'Test Project Name', visible: true
fill_in :path, with: 'test-project-path', visible: true
attach_file('file', file)
@@ -74,7 +77,8 @@ describe 'Import/Export - project import integration test', :js do
visit new_project_path
select2(user.namespace.id, from: '#project_namespace_id')
- fill_in :project_path, with: project.name, visible: true
+ fill_in :project_name, with: project.name, visible: true
+ fill_in :project_path, with: project.path, visible: true
click_import_project_tab
click_link 'GitLab export'
attach_file('file', file)