Commit 746f97a2 authored by Dave Pisek's avatar Dave Pisek

Add specs to verify query is not requested

parent aef22ce3
...@@ -184,12 +184,19 @@ describe('DastSiteProfileForm', () => { ...@@ -184,12 +184,19 @@ describe('DastSiteProfileForm', () => {
await findSiteValidationToggle().vm.$emit('change', true); await findSiteValidationToggle().vm.$emit('change', true);
}; };
describe('with feature flag disabled', () => { describe.each`
title | siteProfile
${'New site profile'} | ${null}
${'Edit site profile'} | ${{ id: 1, name: 'foo', targetUrl: 'bar' }}
`('$title with feature flag disabled', ({ siteProfile }) => {
beforeEach(() => { beforeEach(() => {
createComponent({ createComponent({
provide: { provide: {
glFeatures: { securityOnDemandScansSiteValidation: false }, glFeatures: { securityOnDemandScansSiteValidation: false },
}, },
propsData: {
siteProfile,
},
}); });
}); });
...@@ -197,6 +204,10 @@ describe('DastSiteProfileForm', () => { ...@@ -197,6 +204,10 @@ describe('DastSiteProfileForm', () => {
expect(findSiteValidationToggle().exists()).toBe(false); expect(findSiteValidationToggle().exists()).toBe(false);
expect(findDastSiteValidation().exists()).toBe(false); expect(findDastSiteValidation().exists()).toBe(false);
}); });
it('does not check the target URLs validation status', () => {
expect(requestHandlers.dastSiteValidation).not.toHaveBeenCalled();
});
}); });
describe('with feature flag enabled', () => { describe('with feature flag enabled', () => {
......
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