Commit dfcb05f1 authored by Winnie Hellmann (back on 23rd)'s avatar Winnie Hellmann (back on 23rd) Committed by Fatih Acet

Add missing sourceBranchLink prop to CI widget

parent 5c780244
...@@ -234,6 +234,7 @@ export default { ...@@ -234,6 +234,7 @@ export default {
:pipeline="mr.pipeline" :pipeline="mr.pipeline"
:ci-status="mr.ciStatus" :ci-status="mr.ciStatus"
:has-ci="mr.hasCI" :has-ci="mr.hasCI"
:source-branch-link="mr.sourceBranchLink"
/> />
<deployment <deployment
v-for="deployment in mr.deployments" 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', () => { ...@@ -49,11 +49,13 @@ describe('ee merge request widget options', () => {
vm.$destroy(); vm.$destroy();
mock.restore(); mock.restore();
// Clean security reports state if (Component.mr) {
Component.mr.sast = state().sast; // Clean security reports state
Component.mr.sastContainer = state().sastContainer; Component.mr.sast = state().sast;
Component.mr.dast = state().dast; Component.mr.sastContainer = state().sastContainer;
Component.mr.dependencyScanning = state().dependencyScanning; Component.mr.dast = state().dast;
Component.mr.dependencyScanning = state().dependencyScanning;
}
}); });
describe('security widget', () => { describe('security widget', () => {
...@@ -879,4 +881,19 @@ describe('ee merge request widget options', () => { ...@@ -879,4 +881,19 @@ describe('ee merge request widget options', () => {
expect(vm.$el.querySelectorAll('.deploy-heading').length).toBe(2); 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