Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-10-14 17:20:55 +0300
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-10-18 16:29:29 +0300
commit2115c360d0e096ca945bb2a39862ae8d14abfa4f (patch)
treec8e6d5da957ddb4fbe22582f93c902525212fe2f
parent0bd525005ba279eae2733c0c68df280e4fb25b70 (diff)
Remove unnecessary retried check & fix test failures
-rw-r--r--app/helpers/builds_helper.rb1
-rw-r--r--app/views/projects/ci/builds/_build.html.haml4
-rw-r--r--spec/features/projects/pipelines_spec.rb2
3 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/builds_helper.rb b/app/helpers/builds_helper.rb
index b2004b99961..f3aaff9140d 100644
--- a/app/helpers/builds_helper.rb
+++ b/app/helpers/builds_helper.rb
@@ -3,5 +3,6 @@ module BuildsHelper
build_class = ''
build_class += ' active' if build == current_build
build_class += ' retried' if build.retried?
+ build_class
end
end
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml
index 583fd958849..bf157e4f64a 100644
--- a/app/views/projects/ci/builds/_build.html.haml
+++ b/app/views/projects/ci/builds/_build.html.haml
@@ -6,7 +6,7 @@
- coverage = local_assigns.fetch(:coverage, 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
- if can?(current_user, :read_build, build)
= ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build))
@@ -36,7 +36,7 @@
- if build.stuck?
= 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')
.label-container
diff --git a/spec/features/projects/pipelines_spec.rb b/spec/features/projects/pipelines_spec.rb
index 47482bc3cc9..db56a50e058 100644
--- a/spec/features/projects/pipelines_spec.rb
+++ b/spec/features/projects/pipelines_spec.rb
@@ -177,7 +177,7 @@ describe "Pipelines" do
before { click_on '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