Commit fca9d238 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'make-all-downstream-upstream-ids-links' into 'master'

Make Pipeline ID's always a link for downstream/upstream pipelines

See merge request gitlab-org/gitlab!42107
parents bb766baa 451300a7
......@@ -130,14 +130,9 @@ export default {
{{ downstreamTitle }}
</span>
<div class="gl-text-truncate">
<gl-link
v-if="childPipeline"
class="gl-text-blue-500!"
:href="pipeline.path"
data-testid="childPipelineLink"
<gl-link class="gl-text-blue-500!" :href="pipeline.path" data-testid="pipelineLink"
>#{{ pipeline.id }}</gl-link
>
<span v-else>#{{ pipeline.id }}</span>
</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', () => {
const findPipelineLabel = () => wrapper.find('[data-testid="downstream-pipeline-label"]');
const findLinkedPipeline = () => wrapper.find({ ref: 'linkedPipeline' });
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 createWrapper = (propsData, data = []) => {
......@@ -126,14 +126,14 @@ describe('Linked pipeline', () => {
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);
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);
expect(findPipelineLink().exists()).toBe(false);
expect(findPipelineLink().attributes('href')).toBe(mockData.triggered_by.path);
});
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