diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-16 00:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-16 00:09:09 +0300 |
commit | d1377e82d9bccd6b49c08aa67f6776b7981295ae (patch) | |
tree | 0a02a1b531d6e8097efc11468303bffbd0f18af5 /spec/frontend/security_configuration | |
parent | d811b6d8f61b45cd12f94251abff9102b8cefc19 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/security_configuration')
-rw-r--r-- | spec/frontend/security_configuration/components/feature_card_spec.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/spec/frontend/security_configuration/components/feature_card_spec.js b/spec/frontend/security_configuration/components/feature_card_spec.js index c69e135012e..3658dbb5ef2 100644 --- a/spec/frontend/security_configuration/components/feature_card_spec.js +++ b/spec/frontend/security_configuration/components/feature_card_spec.js @@ -3,6 +3,7 @@ import { mount } from '@vue/test-utils'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import FeatureCard from '~/security_configuration/components/feature_card.vue'; import ManageViaMr from '~/vue_shared/security_configuration/components/manage_via_mr.vue'; +import { REPORT_TYPE_SAST } from '~/vue_shared/security_reports/constants'; import { makeFeature } from './utils'; describe('FeatureCard component', () => { @@ -126,21 +127,23 @@ describe('FeatureCard component', () => { describe('actions', () => { describe.each` - context | available | configured | configurationPath | canEnableByMergeRequest | action - ${'unavailable'} | ${false} | ${false} | ${null} | ${false} | ${null} - ${'available'} | ${true} | ${false} | ${null} | ${false} | ${'guide'} - ${'configured'} | ${true} | ${true} | ${null} | ${false} | ${'guide'} - ${'available, can enable by MR'} | ${true} | ${false} | ${null} | ${true} | ${'create-mr'} - ${'configured, can enable by MR'} | ${true} | ${true} | ${null} | ${true} | ${'guide'} - ${'available with config path'} | ${true} | ${false} | ${'foo'} | ${false} | ${'enable'} - ${'available with config path, can enable by MR'} | ${true} | ${false} | ${'foo'} | ${true} | ${'enable'} - ${'configured with config path'} | ${true} | ${true} | ${'foo'} | ${false} | ${'configure'} - ${'configured with config path, can enable by MR'} | ${true} | ${true} | ${'foo'} | ${true} | ${'configure'} + context | type | available | configured | configurationPath | canEnableByMergeRequest | action + ${'unavailable'} | ${REPORT_TYPE_SAST} | ${false} | ${false} | ${null} | ${false} | ${null} + ${'available'} | ${REPORT_TYPE_SAST} | ${true} | ${false} | ${null} | ${false} | ${'guide'} + ${'configured'} | ${REPORT_TYPE_SAST} | ${true} | ${true} | ${null} | ${false} | ${'guide'} + ${'available, can enable by MR'} | ${REPORT_TYPE_SAST} | ${true} | ${false} | ${null} | ${true} | ${'create-mr'} + ${'available, can enable by MR, unknown type'} | ${'foo'} | ${true} | ${false} | ${null} | ${true} | ${'guide'} + ${'configured, can enable by MR'} | ${REPORT_TYPE_SAST} | ${true} | ${true} | ${null} | ${true} | ${'guide'} + ${'available with config path'} | ${REPORT_TYPE_SAST} | ${true} | ${false} | ${'foo'} | ${false} | ${'enable'} + ${'available with config path, can enable by MR'} | ${REPORT_TYPE_SAST} | ${true} | ${false} | ${'foo'} | ${true} | ${'enable'} + ${'configured with config path'} | ${REPORT_TYPE_SAST} | ${true} | ${true} | ${'foo'} | ${false} | ${'configure'} + ${'configured with config path, can enable by MR'} | ${REPORT_TYPE_SAST} | ${true} | ${true} | ${'foo'} | ${true} | ${'configure'} `( 'given $context feature', - ({ available, configured, configurationPath, canEnableByMergeRequest, action }) => { + ({ type, available, configured, configurationPath, canEnableByMergeRequest, action }) => { beforeEach(() => { feature = makeFeature({ + type, available, configured, configurationPath, |