Commit 1f1bcbb0 authored by Mike Greiling's avatar Mike Greiling

Merge branch '6513-fix-typo' into 'master'

Resolve "Fix typo in security reports state"

Closes #6513

See merge request gitlab-org/gitlab-ee!6207
parents 840bc2a0 07e7443c
......@@ -132,7 +132,7 @@ export default () => ({
learnMoreUrl: null,
vulnerability: {
isDimissed: false,
isDismissed: false,
hasIssue: false,
},
......
......@@ -310,6 +310,62 @@ describe('security reports mutations', () => {
});
describe('SET_ISSUE_MODAL_DATA', () => {
it('has default data', () => {
expect(stateCopy.modal.data.description.value).toEqual(null);
expect(stateCopy.modal.data.description.text).toEqual('Description');
expect(stateCopy.modal.data.description.isLink).toEqual(false);
expect(stateCopy.modal.data.identifiers.value).toEqual([]);
expect(stateCopy.modal.data.identifiers.text).toEqual('Identifiers');
expect(stateCopy.modal.data.identifiers.isLink).toEqual(false);
expect(stateCopy.modal.data.file.value).toEqual(null);
expect(stateCopy.modal.data.file.text).toEqual('File');
expect(stateCopy.modal.data.file.isLink).toEqual(true);
expect(stateCopy.modal.data.className.value).toEqual(null);
expect(stateCopy.modal.data.className.text).toEqual('Class');
expect(stateCopy.modal.data.className.isLink).toEqual(false);
expect(stateCopy.modal.data.methodName.value).toEqual(null);
expect(stateCopy.modal.data.methodName.text).toEqual('Method');
expect(stateCopy.modal.data.methodName.isLink).toEqual(false);
expect(stateCopy.modal.data.namespace.value).toEqual(null);
expect(stateCopy.modal.data.namespace.text).toEqual('Namespace');
expect(stateCopy.modal.data.namespace.isLink).toEqual(false);
expect(stateCopy.modal.data.severity.value).toEqual(null);
expect(stateCopy.modal.data.severity.text).toEqual('Severity');
expect(stateCopy.modal.data.severity.isLink).toEqual(false);
expect(stateCopy.modal.data.confidence.value).toEqual(null);
expect(stateCopy.modal.data.confidence.text).toEqual('Confidence');
expect(stateCopy.modal.data.confidence.isLink).toEqual(false);
expect(stateCopy.modal.data.solution.value).toEqual(null);
expect(stateCopy.modal.data.solution.text).toEqual('Solution');
expect(stateCopy.modal.data.solution.isLink).toEqual(false);
expect(stateCopy.modal.data.links.value).toEqual([]);
expect(stateCopy.modal.data.links.text).toEqual('Links');
expect(stateCopy.modal.data.links.isLink).toEqual(false);
expect(stateCopy.modal.data.instances.value).toEqual([]);
expect(stateCopy.modal.data.instances.text).toEqual('Instances');
expect(stateCopy.modal.data.instances.isLink).toEqual(false);
expect(stateCopy.modal.vulnerability.isDismissed).toEqual(false);
expect(stateCopy.modal.vulnerability.hasIssue).toEqual(false);
expect(stateCopy.modal.isCreatingNewIssue).toEqual(false);
expect(stateCopy.modal.isDismissingIssue).toEqual(false);
expect(stateCopy.modal.title).toEqual(null);
expect(stateCopy.modal.learnMoreUrl).toEqual(null);
expect(stateCopy.modal.error).toEqual(null);
});
it('sets modal data', () => {
stateCopy.vulnerabilityFeedbackPath = 'path';
......
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