Commit 41c719bc authored by Kamil Trzciński's avatar Kamil Trzciński

Fix tests

parent 11ee48f3
...@@ -83,7 +83,7 @@ module Gitlab ...@@ -83,7 +83,7 @@ module Gitlab
columns[@allow_failure_key] = :allow_failure if @allow_failure_key columns[@allow_failure_key] = :allow_failure if @allow_failure_key
all_statuses all_statuses
.pluck(*columns) .pluck(*columns) # rubocop: disable CodeReuse/ActiveRecord
.each(&method(:consume_status)) .each(&method(:consume_status))
end end
......
...@@ -104,20 +104,20 @@ describe 'User browses a job', :js do ...@@ -104,20 +104,20 @@ describe 'User browses a job', :js do
it 'displays the failure reason' do it 'displays the failure reason' do
wait_for_all_requests wait_for_all_requests
within('.builds-container') do within('.builds-container') do
build_link = first('.build-job > a') expect(page).to have_selector(
expect(build_link['data-original-title']).to eq('test - failed - (unknown failure)') ".build-job > a[data-original-title='test - failed - (unknown failure)']")
end end
end end
end end
context 'when a failed job has been retried' do context 'when a failed job has been retried' do
let!(:build) { create(:ci_build, :failed, :retried, :trace_artifact, pipeline: pipeline) } let!(:build_retried) { create(:ci_build, :failed, :retried, :trace_artifact, pipeline: pipeline) }
it 'displays the failure reason and retried label' do it 'displays the failure reason and retried label' do
wait_for_all_requests wait_for_all_requests
within('.builds-container') do within('.builds-container') do
build_link = first('.build-job > a') expect(page).to have_selector(
expect(build_link['data-original-title']).to eq('test - failed - (unknown failure) (retried)') ".build-job > a[data-original-title='test - failed - (unknown failure) (retried)']")
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment