Commit a50fe76e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '210327-pipeline-vendor-in-scanner-column' into 'master'

Add scanner vendor to pipeline scanner column

See merge request gitlab-org/gitlab!36764
parents 40bc0825 a8cba0a8
......@@ -70,6 +70,9 @@ export default {
useConvertReportType() {
return convertReportType(this.vulnerability.report_type);
},
vulnerabilityVendor() {
return this.vulnerability.scanner?.vendor;
},
},
methods: {
...mapActions('vulnerabilities', ['openModal', 'selectVulnerability', 'deselectVulnerability']),
......@@ -155,8 +158,13 @@ export default {
<div class="table-section section-15">
<div class="table-mobile-header" role="rowheader">{{ s__('Reports|Scanner') }}</div>
<div class="table-mobile-content text-capitalize">
{{ useConvertReportType }}
<div class="table-mobile-content">
<div class="text-capitalize">
{{ useConvertReportType }}
</div>
<div v-if="vulnerabilityVendor" class="gl-text-gray-500" data-testid="vulnerability-vendor">
{{ vulnerabilityVendor }}
</div>
</div>
</div>
......
---
title: Add scanner vendor to pipeline scanner column
merge_request: 36764
author:
type: changed
......@@ -53,6 +53,11 @@ describe('Security Dashboard Table Row', () => {
expect(findContent(0).text()).toEqual('');
});
it('should render a `` for the report type and scanner', () => {
expect(findContent(3).text()).toEqual('');
expect(wrapper.find('vulnerability-vendor').exists()).toBeFalsy();
});
it('should not render action buttons', () => {
expect(wrapper.findAll('.action-buttons button')).toHaveLength(0);
});
......@@ -89,6 +94,10 @@ describe('Security Dashboard Table Row', () => {
).toContain(vulnerability.report_type.toLowerCase());
});
it('should render the scanner vendor if the scanner does exist', () => {
expect(findContent(3).text()).toContain(vulnerability.scanner.vendor);
});
describe('the project name', () => {
it('should render the name', () => {
expect(findContent(1).text()).toContain(vulnerability.name);
......
......@@ -8,6 +8,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -75,6 +76,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -128,6 +130,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -205,6 +208,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -283,6 +287,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -384,6 +389,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -437,6 +443,7 @@ export default [
scanner: {
external_id: 'find_sec_bugs',
name: 'Find Security Bugs',
vendor: 'GitLab',
},
identifiers: [
{
......@@ -514,6 +521,7 @@ export default [
scanner: {
external_id: 'clair',
name: 'Clair',
vendor: 'GitLab',
},
identifiers: [
{
......
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