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