Commit b7f93387 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'winh-fix-ci-widget-branch' into 'master'

Add missing sourceBranchLink prop to CI widget

Closes #6897

See merge request gitlab-org/gitlab-ee!6493
parents 5c780244 dfcb05f1
......@@ -234,6 +234,7 @@ export default {
:pipeline="mr.pipeline"
:ci-status="mr.ciStatus"
:has-ci="mr.hasCI"
:source-branch-link="mr.sourceBranchLink"
/>
<deployment
v-for="deployment in mr.deployments"
......
---
title: Add missing sourceBranchLink prop to CI widget
merge_request: 6493
author:
type: fixed
......@@ -49,11 +49,13 @@ describe('ee merge request widget options', () => {
vm.$destroy();
mock.restore();
if (Component.mr) {
// Clean security reports state
Component.mr.sast = state().sast;
Component.mr.sastContainer = state().sastContainer;
Component.mr.dast = state().dast;
Component.mr.dependencyScanning = state().dependencyScanning;
}
});
describe('security widget', () => {
......@@ -879,4 +881,19 @@ describe('ee merge request widget options', () => {
expect(vm.$el.querySelectorAll('.deploy-heading').length).toBe(2);
});
});
describe('CI widget', () => {
it('renders the branch in the pipeline widget', () => {
const sourceBranchLink = '<a href="https://www.zelda.com/">Link</a>';
vm = mountComponent(Component, {
mrData: {
...mockData,
source_branch_with_namespace_link: sourceBranchLink,
},
});
const ciWidget = vm.$el.querySelector('.mr-state-widget .label-branch');
expect(ciWidget).toContainHtml(sourceBranchLink);
});
});
});
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