Merge branch 'fix/hide-retried-builds-in-pipeline-stage-dropdown' into 'master'
Do not show retried builds in pipeline stage dropdown Closes #25980 See merge request !8260
This commit is contained in:
commit
deb3cd7153
|
@ -1,4 +1,4 @@
|
|||
%ul
|
||||
- @stage.statuses.each do |status|
|
||||
- @stage.statuses.latest.each do |status|
|
||||
%li.dropdown-build
|
||||
= render 'ci/status/graph_badge', subject: status
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Do not show retried builds in pipeline stage dropdown
|
||||
merge_request: 8260
|
||||
author:
|
|
@ -7,15 +7,47 @@ describe 'projects/pipelines/_stage', :view do
|
|||
|
||||
before do
|
||||
assign :stage, stage
|
||||
|
||||
create(:ci_build, name: 'test:build',
|
||||
stage: stage.name,
|
||||
pipeline: pipeline)
|
||||
end
|
||||
|
||||
it 'shows the builds in the stage' do
|
||||
render
|
||||
context 'when there are only latest builds present' do
|
||||
before do
|
||||
create(:ci_build, name: 'test:build',
|
||||
stage: stage.name,
|
||||
pipeline: pipeline)
|
||||
end
|
||||
|
||||
expect(rendered).to have_text 'test:build'
|
||||
it 'shows the builds in the stage' do
|
||||
render
|
||||
|
||||
expect(rendered).to have_text 'test:build'
|
||||
end
|
||||
end
|
||||
|
||||
context 'when build belongs to different stage' do
|
||||
before do
|
||||
create(:ci_build, name: 'test:build',
|
||||
stage: 'other:stage',
|
||||
pipeline: pipeline)
|
||||
end
|
||||
|
||||
it 'does not render build' do
|
||||
render
|
||||
|
||||
expect(rendered).not_to have_text 'test:build'
|
||||
end
|
||||
end
|
||||
|
||||
context 'when there are retried builds present' do
|
||||
before do
|
||||
create_list(:ci_build, 2, name: 'test:build',
|
||||
stage: stage.name,
|
||||
pipeline: pipeline)
|
||||
end
|
||||
|
||||
it 'shows only latest builds' do
|
||||
render
|
||||
|
||||
expect(rendered).to have_text 'test:build', count: 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue