summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-01 14:21:03 +0000
committerDouwe Maan <douwe@gitlab.com>2016-06-01 14:21:03 +0000
commitef6fe42ec05d40935154d2bb22a44fdb7d1eac8e (patch)
tree5cd5193484c3bb42e41b97831d9277381d1f3943 /spec
parent4581e71c44c72d1e5e40e9ad00f3d136334ac931 (diff)
parent57992f3d03115e391322f53839f5121e7a740120 (diff)
downloadgitlab-ce-ef6fe42ec05d40935154d2bb22a44fdb7d1eac8e.tar.gz
Merge branch 'fix-cancelable-retryable' into 'master'
Fix cancelability and retriablity of pipeline with generic statuses Currently it's not possible to cancel or retry generic status since this is external thing to GitLab. This fixes shown actions of pipelines containing only these actions. See merge request !4380
Diffstat (limited to 'spec')
-rw-r--r--spec/features/pipelines_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb
index bef0578a9bb..acd6fb3538c 100644
--- a/spec/features/pipelines_spec.rb
+++ b/spec/features/pipelines_spec.rb
@@ -62,6 +62,36 @@ describe "Pipelines" do
end
end
+ context 'for generic statuses' do
+ context 'when running' do
+ let!(:running) { create(:generic_commit_status, status: 'running', commit: pipeline, stage: 'test') }
+
+ before { visit namespace_project_pipelines_path(project.namespace, project) }
+
+ it 'not be cancelable' do
+ expect(page).not_to have_link('Cancel')
+ end
+
+ it 'pipeline is running' do
+ expect(page).to have_selector('.ci-running')
+ end
+ end
+
+ context 'when failed' do
+ let!(:running) { create(:generic_commit_status, status: 'failed', commit: pipeline, stage: 'test') }
+
+ before { visit namespace_project_pipelines_path(project.namespace, project) }
+
+ it 'not be retryable' do
+ expect(page).not_to have_link('Retry')
+ end
+
+ it 'pipeline is failed' do
+ expect(page).to have_selector('.ci-failed')
+ end
+ end
+ end
+
context 'downloadable pipelines' do
context 'with artifacts' do
let!(:with_artifacts) { create(:ci_build, :artifacts, :success, commit: pipeline, name: 'rspec tests', stage: 'test') }