Commit a8cba0a8 authored by Alexander Turinske's avatar Alexander Turinske

Update vendor to conditionally render

- update tests
parent 9fd8789a
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
return convertReportType(this.vulnerability.report_type); return convertReportType(this.vulnerability.report_type);
}, },
vulnerabilityVendor() { vulnerabilityVendor() {
return this.vulnerability.scanner?.vendor || ''; return this.vulnerability.scanner?.vendor;
}, },
}, },
methods: { methods: {
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
<div class="text-capitalize"> <div class="text-capitalize">
{{ useConvertReportType }} {{ useConvertReportType }}
</div> </div>
<div class="gl-text-gray-500"> <div v-if="vulnerabilityVendor" class="gl-text-gray-500" data-testid="vulnerability-vendor">
{{ vulnerabilityVendor }} {{ vulnerabilityVendor }}
</div> </div>
</div> </div>
......
...@@ -55,6 +55,7 @@ describe('Security Dashboard Table Row', () => { ...@@ -55,6 +55,7 @@ describe('Security Dashboard Table Row', () => {
it('should render a `` for the report type and scanner', () => { it('should render a `` for the report type and scanner', () => {
expect(findContent(3).text()).toEqual(''); expect(findContent(3).text()).toEqual('');
expect(wrapper.find('vulnerability-vendor').exists()).toBeFalsy();
}); });
it('should not render action buttons', () => { it('should not render action buttons', () => {
......
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