Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects_spec.rb')
-rw-r--r--spec/features/projects_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb
index ab0b6725491..3577498c3b4 100644
--- a/spec/features/projects_spec.rb
+++ b/spec/features/projects_spec.rb
@@ -254,13 +254,13 @@ RSpec.describe 'Project' do
end
it 'focuses on the confirmation field' do
- click_button 'Remove project'
+ click_button 'Delete project'
expect(page).to have_selector '#confirm_name_input:focus'
end
- it 'removes a project', :sidekiq_might_not_need_inline do
- expect { remove_with_confirm('Remove project', project.path) }.to change { Project.count }.by(-1)
+ it 'deletes a project', :sidekiq_might_not_need_inline do
+ expect { remove_with_confirm('Delete project', "Delete #{project.full_name}", 'Yes, delete project') }.to change { Project.count }.by(-1)
expect(page).to have_content "Project '#{project.full_name}' is in the process of being deleted."
expect(Project.all.count).to be_zero
expect(project.issues).to be_empty
@@ -386,9 +386,9 @@ RSpec.describe 'Project' do
{ form: '.rspec-merge-request-settings', input: '#project_printing_merge_request_link_enabled' }]
end
- def remove_with_confirm(button_text, confirm_with)
+ def remove_with_confirm(button_text, confirm_with, confirm_button_text = 'Confirm')
click_button button_text
fill_in 'confirm_name_input', with: confirm_with
- click_button 'Confirm'
+ click_button confirm_button_text
end
end