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:
authorTim Zallmann <tzallmann@gitlab.com>2017-11-07 19:32:21 +0300
committerTim Zallmann <tzallmann@gitlab.com>2017-11-07 19:32:21 +0300
commitcc175278467118585e86a8a425715a4e5ae62c95 (patch)
treec16f84140d4eb8004b0b718dc321f69c1ac0889d
parenta3e1cb8187a4e2b926e8496af4a9ea80c91d491a (diff)
parent091f6387e4a9602e3213bbcfff1d51209d7efed4 (diff)
Merge branch '39878-commit-pipeline-reads-wrong-key' into 'master'
Fix commit pipeline showing wrong status Closes #39878 See merge request gitlab-org/gitlab-ce!15238
-rw-r--r--app/views/projects/commit/_commit_box.html.haml2
-rw-r--r--changelogs/unreleased/39878-commit-pipeline-reads-wrong-key.yml5
-rw-r--r--spec/features/projects/commit/mini_pipeline_graph_spec.rb7
3 files changed, 13 insertions, 1 deletions
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index ff17372fdd9..3f4415f9e5e 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -67,7 +67,7 @@
- if @commit.last_pipeline
- last_pipeline = @commit.last_pipeline
.well-segment.pipeline-info
- .status-icon-container{ class: "ci-status-icon-#{@commit.status}" }
+ .status-icon-container{ class: "ci-status-icon-#{last_pipeline.status}" }
= link_to project_pipeline_path(@project, last_pipeline.id) do
= ci_icon_for_status(last_pipeline.status)
#{ _('Pipeline') }
diff --git a/changelogs/unreleased/39878-commit-pipeline-reads-wrong-key.yml b/changelogs/unreleased/39878-commit-pipeline-reads-wrong-key.yml
new file mode 100644
index 00000000000..b24edfe0cb9
--- /dev/null
+++ b/changelogs/unreleased/39878-commit-pipeline-reads-wrong-key.yml
@@ -0,0 +1,5 @@
+---
+title: Fix commit pipeline showing wrong status
+merge_request:
+author:
+type: fixed
diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
index 807a2189cc4..91282063a8d 100644
--- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb
+++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
@@ -12,6 +12,13 @@ feature 'Mini Pipeline Graph in Commit View', :js do
end
let(:build) { create(:ci_build, pipeline: pipeline) }
+ it 'display icon with status' do
+ build.run
+ visit project_commit_path(project, project.commit.id)
+
+ expect(page).to have_selector('.ci-status-icon-running')
+ end
+
it 'displays a mini pipeline graph' do
build.run
visit project_commit_path(project, project.commit.id)