diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2019-03-20 22:25:23 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-03-20 22:25:23 +0000 |
commit | 6a0702fe9382c2b3c4a72421054d46821a95c781 (patch) | |
tree | 9e72a10dfddcf1b93019e2903393dbc3edc0fb85 /spec/features/projects/pipelines/pipeline_spec.rb | |
parent | f7fcfc7720c5149e2fa6f027900503ae3f215bf1 (diff) | |
parent | 0c3df3b56973d78345c6791cc3882a50d916cbc8 (diff) | |
download | gitlab-ce-6a0702fe9382c2b3c4a72421054d46821a95c781.tar.gz |
Merge branch '57115-just-in-time-k8s-resource-creation' into 'master'
Create project-specific Kubernetes resources just-in-time
See merge request gitlab-org/gitlab-ce!25586
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 5d2a99f40b7..9fdf78baa1e 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -24,6 +24,11 @@ describe 'Pipeline', :js do pipeline: pipeline, stage: 'test', name: 'test') end + let!(:build_preparing) do + create(:ci_build, :preparing, + pipeline: pipeline, stage: 'deploy', name: 'prepare') + end + let!(:build_running) do create(:ci_build, :running, pipeline: pipeline, stage: 'deploy', name: 'deploy') @@ -109,6 +114,24 @@ describe 'Pipeline', :js do end end + context 'when pipeline has preparing builds' do + it 'shows a preparing icon and a cancel action' do + page.within('#ci-badge-prepare') do + expect(page).to have_selector('.js-ci-status-icon-preparing') + expect(page).to have_selector('.js-icon-cancel') + expect(page).to have_content('prepare') + end + end + + it 'cancels the preparing build and shows retry button' do + find('#ci-badge-deploy .ci-action-icon-container').click + + page.within('#ci-badge-deploy') do + expect(page).to have_css('.js-icon-retry') + end + end + end + context 'when pipeline has successful builds' do it 'shows the success icon and a retry action for the successful build' do page.within('#ci-badge-build') do |