diff options
Diffstat (limited to 'spec/features/projects/ci/secure_files_spec.rb')
-rw-r--r-- | spec/features/projects/ci/secure_files_spec.rb | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/spec/features/projects/ci/secure_files_spec.rb b/spec/features/projects/ci/secure_files_spec.rb deleted file mode 100644 index 412330eb5d6..00000000000 --- a/spec/features/projects/ci/secure_files_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Secure Files', :js do - let(:project) { create(:project) } - let(:user) { create(:user) } - - before do - stub_feature_flags(ci_secure_files_read_only: false) - project.add_maintainer(user) - sign_in(user) - end - - it 'user sees the Secure Files list component' do - visit project_ci_secure_files_path(project) - expect(page).to have_content('There are no secure files yet.') - end - - it 'prompts the user to confirm before deleting a file' do - file = create(:ci_secure_file, project: project) - - visit project_ci_secure_files_path(project) - - expect(page).to have_content(file.name) - - find('button.btn-danger').click - - expect(page).to have_content("Delete #{file.name}?") - - click_on('Delete secure file') - - visit project_ci_secure_files_path(project) - - expect(page).not_to have_content(file.name) - end - - it 'displays an uploaded file in the file list' do - visit project_ci_secure_files_path(project) - expect(page).to have_content('There are no secure files yet.') - - page.attach_file('spec/fixtures/ci_secure_files/upload-keystore.jks') do - click_button 'Upload File' - end - - expect(page).to have_content('upload-keystore.jks') - end - - it 'displays an error when a duplicate file upload is attempted' do - create(:ci_secure_file, project: project, name: 'upload-keystore.jks') - visit project_ci_secure_files_path(project) - - expect(page).to have_content('upload-keystore.jks') - - page.attach_file('spec/fixtures/ci_secure_files/upload-keystore.jks') do - click_button 'Upload File' - end - - expect(page).to have_content('A file with this name already exists.') - end -end |