Commit 05e46a2f authored by Clement Ho's avatar Clement Ho Committed by Regis

Merge branch '27880-pipelines-table-not-showing-commit-branch' into 'master'

Looks for correct key to pass to commit prop. Adds rspec test.

Closes #27880

See merge request !9070
parent 3eb7fe19
...@@ -111,7 +111,7 @@ require('./commit'); ...@@ -111,7 +111,7 @@ require('./commit');
* If provided, returns the commit ref. * If provided, returns the commit ref.
* Needed to render the commit component column. * Needed to render the commit component column.
* *
* Matched `url` prop sent in the API to `path` prop needed * Matches `path` prop sent in the API to `ref_url` prop needed
* in the commit component. * in the commit component.
* *
* @returns {Object|Undefined} * @returns {Object|Undefined}
...@@ -119,8 +119,8 @@ require('./commit'); ...@@ -119,8 +119,8 @@ require('./commit');
commitRef() { commitRef() {
if (this.pipeline.ref) { if (this.pipeline.ref) {
return Object.keys(this.pipeline.ref).reduce((accumulator, prop) => { return Object.keys(this.pipeline.ref).reduce((accumulator, prop) => {
if (prop === 'url') { if (prop === 'path') {
accumulator.path = this.pipeline.ref[prop]; accumulator.ref_url = this.pipeline.ref[prop];
} else { } else {
accumulator[prop] = this.pipeline.ref[prop]; accumulator[prop] = this.pipeline.ref[prop];
} }
......
---
title: Fixes Pipelines table is not showing branch name for commit
merge_request:
author:
...@@ -35,6 +35,10 @@ describe 'Pipelines', :feature, :js do ...@@ -35,6 +35,10 @@ describe 'Pipelines', :feature, :js do
it 'contains pipeline commit short SHA' do it 'contains pipeline commit short SHA' do
expect(page).to have_content(pipeline.short_sha) expect(page).to have_content(pipeline.short_sha)
end end
it 'contains branch name' do
expect(page).to have_content(pipeline.ref)
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