diff options
Diffstat (limited to 'spec/features/projects/import_export')
3 files changed, 6 insertions, 16 deletions
diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb index 43c2c401f4a..62d244ff259 100644 --- a/spec/features/projects/import_export/export_file_spec.rb +++ b/spec/features/projects/import_export/export_file_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' # It looks up for any sensitive word inside the JSON, so if a sensitive word is found # we''l have to either include it adding the model that includes it to the +safe_list+ # or make sure the attribute is blacklisted in the +import_export.yml+ configuration -feature 'Import/Export - project export integration test', feature: true, js: true do +feature 'Import/Export - project export integration test', js: true do include Select2Helper include ExportFileHelper diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index 533ff4612ff..24e7843db63 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Import/Export - project import integration test', feature: true, js: true do +feature 'Import/Export - project import integration test', js: true do include Select2Helper let(:file) { File.join(Rails.root, 'spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') } @@ -29,8 +29,9 @@ feature 'Import/Export - project import integration test', feature: true, js: tr fill_in :project_path, with: 'test-project-path', visible: true click_link 'GitLab export' - expect(page).to have_content('GitLab project export') + expect(page).to have_content('Import an exported GitLab project') expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&path=test-project-path") + expect(Gitlab::ImportExport).to receive(:import_upload_path).with(filename: /\A\h{32}_test-project-path\z/).and_call_original attach_file('file', file) @@ -60,17 +61,6 @@ feature 'Import/Export - project import integration test', feature: true, js: tr expect(page).to have_content('Project could not be imported') end end - - scenario 'project with no name' do - create(:project, namespace: namespace) - - visit new_project_path - - select2(namespace.id, from: '#project_namespace_id') - - # Check for tooltip disabled import button - expect(find('.import_gitlab_project')['title']).to eq('Please enter a valid project name.') - end end context 'when limited to the default user namespace' do diff --git a/spec/features/projects/import_export/namespace_export_file_spec.rb b/spec/features/projects/import_export/namespace_export_file_spec.rb index 74ced0d3b35..691b0e1e4ca 100644 --- a/spec/features/projects/import_export/namespace_export_file_spec.rb +++ b/spec/features/projects/import_export/namespace_export_file_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -feature 'Import/Export - Namespace export file cleanup', feature: true, js: true do +feature 'Import/Export - Namespace export file cleanup', js: true do let(:export_path) { "#{Dir.tmpdir}/import_file_spec" } let(:config_hash) { YAML.load_file(Gitlab::ImportExport.config_file).deep_stringify_keys } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } background do allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path) |