Remove unnecessary retried check & fix test failures

This commit is contained in:
Annabel Dunstone Gray 2016-10-14 09:20:55 -05:00
parent 0bd525005b
commit 2115c360d0
3 changed files with 4 additions and 3 deletions

View File

@ -3,5 +3,6 @@ module BuildsHelper
build_class = '' build_class = ''
build_class += ' active' if build == current_build build_class += ' active' if build == current_build
build_class += ' retried' if build.retried? build_class += ' retried' if build.retried?
build_class
end end
end end

View File

@ -6,7 +6,7 @@
- coverage = local_assigns.fetch(:coverage, false) - coverage = local_assigns.fetch(:coverage, false)
- allow_retry = local_assigns.fetch(:allow_retry, false) - allow_retry = local_assigns.fetch(:allow_retry, false)
%tr.build.commit{class: ('retried' if defined?(retried) && retried)} %tr.build.commit{class: ('retried' if retried)}
%td.status %td.status
- if can?(current_user, :read_build, build) - if can?(current_user, :read_build, build)
= ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build)) = ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build))
@ -36,7 +36,7 @@
- if build.stuck? - if build.stuck?
= icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.')
- if defined?(retried) && retried - if retried
= icon('refresh', class: 'text-warning has-tooltip', title: 'Build was retried') = icon('refresh', class: 'text-warning has-tooltip', title: 'Build was retried')
.label-container .label-container

View File

@ -177,7 +177,7 @@ describe "Pipelines" do
before { click_on 'Retry failed' } before { click_on 'Retry failed' }
it { expect(page).not_to have_content('Retry failed') } it { expect(page).not_to have_content('Retry failed') }
it { expect(page).to have_content('retried') } it { expect(page).to have_selector('.retried') }
end end
end end