diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/features/projects/jobs_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/features/projects/jobs_spec.rb')
-rw-r--r-- | spec/features/projects/jobs_spec.rb | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 404c3e93586..e19337e1ff5 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -1013,7 +1013,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do before do job.run! visit project_job_path(project, job) - find('.js-cancel-job').click + find('[data-testid="cancel-button"]').click end it 'loads the page and shows all needed controls' do @@ -1030,7 +1030,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do visit project_job_path(project, job) wait_for_requests - find('.js-retry-button').click + find('[data-testid="retry-button"]').click end it 'shows the right status and buttons' do @@ -1057,6 +1057,31 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do end end end + + context "Job that failed because of a forward deployment failure" do + let(:job) { create(:ci_build, :forward_deployment_failure, pipeline: pipeline) } + + before do + visit project_job_path(project, job) + wait_for_requests + + find('[data-testid="retry-button"]').click + end + + it 'shows a modal to warn the user' do + page.within('.modal-header') do + expect(page).to have_content 'Are you sure you want to retry this job?' + end + end + + it 'retries the job' do + find('[data-testid="retry-button-modal"]').click + + within '[data-testid="ci-header-content"]' do + expect(page).to have_content('pending') + end + end + end end describe "GET /:project/jobs/:id/download", :js do |