Commit f5b30609 authored by Jordi Llull's avatar Jordi Llull

Remove cancel all jobs button in general jobs list view

parent 549ee8ad
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
.nav-controls .nav-controls
- if can?(current_user, :update_build, @project) - if can?(current_user, :update_build, @project)
- if @all_builds.running_or_pending.limit(1).any? # rubocop: disable CodeReuse/ActiveRecord
= link_to 'Cancel running', cancel_all_project_jobs_path(@project),
data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
- unless @repository.gitlab_ci_yml - unless @repository.gitlab_ci_yml
= link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' = link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info'
......
---
title: Remove Cancel all jobs button in general jobs list view
merge_request:
author: Jordi Llull
type: removed
...@@ -28,7 +28,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -28,7 +28,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end end
it "shows Pending tab jobs" do it "shows Pending tab jobs" do
expect(page).to have_link 'Cancel running'
expect(page).to have_selector('.nav-links li.active', text: 'Pending') expect(page).to have_selector('.nav-links li.active', text: 'Pending')
expect(page).to have_content job.short_sha expect(page).to have_content job.short_sha
expect(page).to have_content job.ref expect(page).to have_content job.ref
...@@ -44,7 +43,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -44,7 +43,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it "shows Running tab jobs" do it "shows Running tab jobs" do
expect(page).to have_selector('.nav-links li.active', text: 'Running') expect(page).to have_selector('.nav-links li.active', text: 'Running')
expect(page).to have_link 'Cancel running'
expect(page).to have_content job.short_sha expect(page).to have_content job.short_sha
expect(page).to have_content job.ref expect(page).to have_content job.ref
expect(page).to have_content job.name expect(page).to have_content job.name
...@@ -60,7 +58,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -60,7 +58,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it "shows Finished tab jobs" do it "shows Finished tab jobs" do
expect(page).to have_selector('.nav-links li.active', text: 'Finished') expect(page).to have_selector('.nav-links li.active', text: 'Finished')
expect(page).to have_content 'No jobs to show' expect(page).to have_content 'No jobs to show'
expect(page).to have_link 'Cancel running'
end end
end end
...@@ -75,7 +72,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -75,7 +72,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
expect(page).to have_content job.short_sha expect(page).to have_content job.short_sha
expect(page).to have_content job.ref expect(page).to have_content job.ref
expect(page).to have_content job.name expect(page).to have_content job.name
expect(page).not_to have_link 'Cancel running'
end end
end end
...@@ -94,23 +90,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do ...@@ -94,23 +90,6 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
end end
end end
describe "POST /:project/jobs/:id/cancel_all" do
before do
job.run!
visit project_jobs_path(project)
click_link "Cancel running"
end
it 'shows all necessary content' do
expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page).to have_content 'canceled'
expect(page).to have_content job.short_sha
expect(page).to have_content job.ref
expect(page).to have_content job.name
expect(page).not_to have_link 'Cancel running'
end
end
describe "GET /:project/jobs/:id" do describe "GET /:project/jobs/:id" do
context "Job from project" do context "Job from project" do
let(:job) { create(:ci_build, :success, :trace_live, pipeline: pipeline) } let(:job) { create(:ci_build, :success, :trace_live, pipeline: pipeline) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment