Commit 931e5b73 authored by Sam Beckham's avatar Sam Beckham Committed by Filipa Lacerda

Splits severity and confidence levels in the FE

- Updates the constants file
- Updates the filters file
- Updates the tests
parent e5a28a57
import { s__ } from '~/locale';
export const SEVERITIES = {
export const SEVERITY_LEVELS = {
critical: 'Critical',
high: 'High',
medium: 'Medium',
low: 'Low',
unknown: 'Unknown',
experimental: 'Experimental',
info: 'Info',
undefined: 'Undefined',
};
export const CONFIDENCE_LEVELS = {
confirmed: 'Confirmed',
high: 'High',
medium: 'Medium',
low: 'Low',
unknown: 'Unknown',
ignore: 'Ignore',
experimental: 'Experimental',
undefined: 'Undefined',
};
......
import { SEVERITIES, REPORT_TYPES } from './constants';
import { SEVERITY_LEVELS, REPORT_TYPES } from './constants';
export default () => ({
filters: [
......@@ -10,7 +10,7 @@ export default () => ({
name: 'All',
id: 'all',
},
...Object.entries(SEVERITIES).map(severity => {
...Object.entries(SEVERITY_LEVELS).map(severity => {
const [id, name] = severity;
return { id, name };
}),
......
---
title: Splits the severity and confidence constants in the group security dashboard
frontend
merge_request: 9535
author:
type: other
......@@ -19,8 +19,8 @@ describe('Filter component', () => {
vm.$destroy();
});
it('should display all 9 severity options', () => {
expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(9);
it('should display all 8 severity options', () => {
expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(8);
});
it('should display a check next to only the selected item', () => {
......
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