diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-09 21:24:33 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-09 21:24:33 +0200 |
commit | 86faee081d4e9e0e01a646e59bd6845ad5241a18 (patch) | |
tree | d6a43cf2f51ba423faf1740fa6b0c76017778d53 /spec/features/pipelines_spec.rb | |
parent | 92c34e56b6f81ba46978ca38c579eb916e4953d5 (diff) | |
parent | ab3cfd520dc02a62dea2a8d73a4060fc1cbc865a (diff) | |
download | gitlab-ce-pipeline-hooks-without-touch.tar.gz |
Merge branch 'refactor-builds-creation-service' into pipeline-hooks-without-touchpipeline-hooks-without-touch
Diffstat (limited to 'spec/features/pipelines_spec.rb')
-rw-r--r-- | spec/features/pipelines_spec.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index 1256f73196b..f88b8f8e60b 100644 --- a/spec/features/pipelines_spec.rb +++ b/spec/features/pipelines_spec.rb @@ -33,7 +33,10 @@ describe "Pipelines" do context 'cancelable pipeline' do let!(:running) { create(:ci_build, :running, pipeline: pipeline, stage: 'test', commands: 'test') } - before { visit namespace_project_pipelines_path(project.namespace, project) } + before do + pipeline.reload_status! + visit namespace_project_pipelines_path(project.namespace, project) + end it { expect(page).to have_link('Cancel') } it { expect(page).to have_selector('.ci-running') } @@ -49,7 +52,10 @@ describe "Pipelines" do context 'retryable pipelines' do let!(:failed) { create(:ci_build, :failed, pipeline: pipeline, stage: 'test', commands: 'test') } - before { visit namespace_project_pipelines_path(project.namespace, project) } + before do + pipeline.reload_status! + visit namespace_project_pipelines_path(project.namespace, project) + end it { expect(page).to have_link('Retry') } it { expect(page).to have_selector('.ci-failed') } @@ -80,7 +86,10 @@ describe "Pipelines" do context 'when running' do let!(:running) { create(:generic_commit_status, status: 'running', pipeline: pipeline, stage: 'test') } - before { visit namespace_project_pipelines_path(project.namespace, project) } + before do + pipeline.reload_status! + visit namespace_project_pipelines_path(project.namespace, project) + end it 'is not cancelable' do expect(page).not_to have_link('Cancel') @@ -92,9 +101,12 @@ describe "Pipelines" do end context 'when failed' do - let!(:running) { create(:generic_commit_status, status: 'failed', pipeline: pipeline, stage: 'test') } + let!(:failed) { create(:generic_commit_status, status: 'failed', pipeline: pipeline, stage: 'test') } - before { visit namespace_project_pipelines_path(project.namespace, project) } + before do + pipeline.reload_status! + visit namespace_project_pipelines_path(project.namespace, project) + end it 'is not retryable' do expect(page).not_to have_link('Retry') |