diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-31 15:31:06 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-31 15:32:03 +0200 |
commit | 99708dcede3305098b2a6f73d70804932d39012e (patch) | |
tree | c8eb4e1be0c53c86de825ba50966a80676faf70d | |
parent | bc621eef541139502201884e49a03f9467ab08fc (diff) | |
download | gitlab-ce-99708dcede3305098b2a6f73d70804932d39012e.tar.gz |
Test cancelability and retriablity of pipeline for generic statuses
-rw-r--r-- | spec/features/pipelines_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index bef0578a9bb..55754008d8a 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).to_not 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).to_not 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') } |