diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/features/projects/jobs/user_browses_job_spec.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) | |
download | gitlab-ce-311b0269b4eb9839fa63f80c8d7a58f32b8138a0.tar.gz |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/features/projects/jobs/user_browses_job_spec.rb')
-rw-r--r-- | spec/features/projects/jobs/user_browses_job_spec.rb | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/spec/features/projects/jobs/user_browses_job_spec.rb b/spec/features/projects/jobs/user_browses_job_spec.rb index 060b7ffbfc9..12e88bbf6a5 100644 --- a/spec/features/projects/jobs/user_browses_job_spec.rb +++ b/spec/features/projects/jobs/user_browses_job_spec.rb @@ -12,6 +12,7 @@ RSpec.describe 'User browses a job', :js do before do project.add_maintainer(user) project.enable_ci + stub_feature_flags(bootstrap_confirmation_modals: false) sign_in(user) @@ -36,8 +37,18 @@ RSpec.describe 'User browses a job', :js do expect(page).to have_content('Job has been erased') end - context 'with a failed job' do - let!(:build) { create(:ci_build, :failed, :trace_artifact, pipeline: pipeline) } + context 'with unarchived trace artifact' do + let!(:build) { create(:ci_build, :success, :unarchived_trace_artifact, :coverage, pipeline: pipeline) } + + it 'shows no trace message', :js do + wait_for_requests + + expect(page).to have_content('This job does not have a trace.') + end + end + + context 'with a failed job and live trace' do + let!(:build) { create(:ci_build, :failed, :trace_live, pipeline: pipeline) } it 'displays the failure reason' do wait_for_all_requests @@ -46,6 +57,18 @@ RSpec.describe 'User browses a job', :js do ".build-job > a[title='test - failed - (unknown failure)']") end end + + context 'with unarchived trace artifact' do + let!(:artifact) { create(:ci_job_artifact, :unarchived_trace_artifact, job: build) } + + it 'displays the failure reason from the live trace' do + wait_for_all_requests + within('.builds-container') do + expect(page).to have_selector( + ".build-job > a[title='test - failed - (unknown failure)']") + end + end + end end context 'when a failed job has been retried' do |