Commit 451300a7 authored by Payton Burdette's avatar Payton Burdette Committed by Kushal Pandya

Make pipeline ID a link

Always make the pipeline id
a link when a downstream,
upstream or mutli-project pipeline.
parent 9dd08f63
...@@ -130,14 +130,9 @@ export default { ...@@ -130,14 +130,9 @@ export default {
{{ downstreamTitle }} {{ downstreamTitle }}
</span> </span>
<div class="gl-text-truncate"> <div class="gl-text-truncate">
<gl-link <gl-link class="gl-text-blue-500!" :href="pipeline.path" data-testid="pipelineLink"
v-if="childPipeline"
class="gl-text-blue-500!"
:href="pipeline.path"
data-testid="childPipelineLink"
>#{{ pipeline.id }}</gl-link >#{{ pipeline.id }}</gl-link
> >
<span v-else>#{{ pipeline.id }}</span>
</div> </div>
</div> </div>
</div> </div>
......
---
title: Make Pipeline ID's always a link for downstream/upstream pipelines
merge_request: 42107
author:
type: added
...@@ -17,7 +17,7 @@ describe('Linked pipeline', () => { ...@@ -17,7 +17,7 @@ describe('Linked pipeline', () => {
const findPipelineLabel = () => wrapper.find('[data-testid="downstream-pipeline-label"]'); const findPipelineLabel = () => wrapper.find('[data-testid="downstream-pipeline-label"]');
const findLinkedPipeline = () => wrapper.find({ ref: 'linkedPipeline' }); const findLinkedPipeline = () => wrapper.find({ ref: 'linkedPipeline' });
const findLoadingIcon = () => wrapper.find(GlLoadingIcon); const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
const findPipelineLink = () => wrapper.find('[data-testid="childPipelineLink"]'); const findPipelineLink = () => wrapper.find('[data-testid="pipelineLink"]');
const findExpandButton = () => wrapper.find('[data-testid="expandPipelineButton"]'); const findExpandButton = () => wrapper.find('[data-testid="expandPipelineButton"]');
const createWrapper = (propsData, data = []) => { const createWrapper = (propsData, data = []) => {
...@@ -126,14 +126,14 @@ describe('Linked pipeline', () => { ...@@ -126,14 +126,14 @@ describe('Linked pipeline', () => {
expect(findPipelineLabel().exists()).toBe(true); expect(findPipelineLabel().exists()).toBe(true);
}); });
it('downsteram pipeline should link to the child pipeline if child', () => { it('downstream pipeline should contain the correct link', () => {
createWrapper(downstreamProps); createWrapper(downstreamProps);
expect(findPipelineLink().attributes('href')).toBe(mockData.triggered_by.path); expect(findPipelineLink().attributes('href')).toBe(mockData.triggered_by.path);
}); });
it('upstream pipeline should not contain a link', () => { it('upstream pipeline should contain the correct link', () => {
createWrapper(upstreamProps); createWrapper(upstreamProps);
expect(findPipelineLink().exists()).toBe(false); expect(findPipelineLink().attributes('href')).toBe(mockData.triggered_by.path);
}); });
it.each` it.each`
......
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