Commit a627bfe9 authored by Jannik Lehmann's avatar Jannik Lehmann Committed by Simon Knox

Add 'view History' Button for Secret-Detection

parent 418450af
...@@ -3,14 +3,16 @@ import { propsUnion } from '~/vue_shared/components/lib/utils/props_utils'; ...@@ -3,14 +3,16 @@ import { propsUnion } from '~/vue_shared/components/lib/utils/props_utils';
import { import {
REPORT_TYPE_SAST, REPORT_TYPE_SAST,
REPORT_TYPE_DAST_PROFILES, REPORT_TYPE_DAST_PROFILES,
REPORT_TYPE_SECRET_DETECTION,
} from '~/vue_shared/security_reports/constants'; } from '~/vue_shared/security_reports/constants';
import StatusDastProfiles from './status_dast_profiles.vue'; import StatusDastProfiles from './status_dast_profiles.vue';
import StatusGeneric from './status_generic.vue'; import StatusGeneric from './status_generic.vue';
import StatusSast from './status_sast.vue'; import StatusViewHistory from './status_view_history.vue';
const scannerComponentMap = { const scannerComponentMap = {
[REPORT_TYPE_SAST]: StatusSast, [REPORT_TYPE_SAST]: StatusViewHistory,
[REPORT_TYPE_DAST_PROFILES]: StatusDastProfiles, [REPORT_TYPE_DAST_PROFILES]: StatusDastProfiles,
[REPORT_TYPE_SECRET_DETECTION]: StatusViewHistory,
}; };
export default { export default {
......
...@@ -3,10 +3,11 @@ import { pick } from 'lodash'; ...@@ -3,10 +3,11 @@ import { pick } from 'lodash';
import FeatureStatus from 'ee/security_configuration/components/feature_status.vue'; import FeatureStatus from 'ee/security_configuration/components/feature_status.vue';
import StatusDastProfiles from 'ee/security_configuration/components/status_dast_profiles.vue'; import StatusDastProfiles from 'ee/security_configuration/components/status_dast_profiles.vue';
import StatusGeneric from 'ee/security_configuration/components/status_generic.vue'; import StatusGeneric from 'ee/security_configuration/components/status_generic.vue';
import StatusSast from 'ee/security_configuration/components/status_sast.vue'; import StatusViewHistory from 'ee/security_configuration/components/status_view_history.vue';
import { import {
REPORT_TYPE_SAST, REPORT_TYPE_SAST,
REPORT_TYPE_DAST_PROFILES, REPORT_TYPE_DAST_PROFILES,
REPORT_TYPE_SECRET_DETECTION,
} from '~/vue_shared/security_reports/constants'; } from '~/vue_shared/security_reports/constants';
import { generateFeatures } from './helpers'; import { generateFeatures } from './helpers';
...@@ -43,10 +44,11 @@ describe('FeatureStatus component', () => { ...@@ -43,10 +44,11 @@ describe('FeatureStatus component', () => {
}); });
describe.each` describe.each`
type | expectedComponent type | expectedComponent
${REPORT_TYPE_SAST} | ${StatusSast} ${REPORT_TYPE_SECRET_DETECTION} | ${StatusViewHistory}
${REPORT_TYPE_DAST_PROFILES} | ${StatusDastProfiles} ${REPORT_TYPE_SAST} | ${StatusViewHistory}
${'foo'} | ${StatusGeneric} ${REPORT_TYPE_DAST_PROFILES} | ${StatusDastProfiles}
${'foo'} | ${StatusGeneric}
`('given a $type feature', ({ type, expectedComponent }) => { `('given a $type feature', ({ type, expectedComponent }) => {
let feature; let feature;
let component; let component;
......
import { GlLink } from '@gitlab/ui'; import { GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import StatusGeneric from 'ee/security_configuration/components/status_generic.vue'; import StatusGeneric from 'ee/security_configuration/components/status_generic.vue';
import StatusSast from 'ee/security_configuration/components/status_sast.vue'; import StatusViewHistory from 'ee/security_configuration/components/status_view_history.vue';
import { REPORT_TYPE_SAST } from '~/vue_shared/security_reports/constants'; import { REPORT_TYPE_SAST } from '~/vue_shared/security_reports/constants';
import { generateFeatures } from './helpers'; import { generateFeatures } from './helpers';
...@@ -12,7 +12,7 @@ describe('StatusSast component', () => { ...@@ -12,7 +12,7 @@ describe('StatusSast component', () => {
let wrapper; let wrapper;
const createComponent = (options) => { const createComponent = (options) => {
wrapper = shallowMount(StatusSast, options); wrapper = shallowMount(StatusViewHistory, options);
}; };
afterEach(() => { afterEach(() => {
......
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