Commit 4abb1f05 authored by Alexander Turinske's avatar Alexander Turinske

Wrap disabled form groups in a disabled parent

- instead of disabling form groups individually,
  this wraps them in a parent form group and
  conditionally disables that.
- update tests
parent 998b460e
...@@ -274,111 +274,111 @@ export default { ...@@ -274,111 +274,111 @@ export default {
</ul> </ul>
</gl-alert> </gl-alert>
<gl-form-group :disabled="isPolicyProfile" :label="s__('DastProfiles|Profile name')"> <gl-form-group data-testid="dast-scanner-parent-group" :disabled="isPolicyProfile">
<gl-form-input <gl-form-group :label="s__('DastProfiles|Profile name')">
v-model="form.profileName.value" <gl-form-input
class="mw-460" v-model="form.profileName.value"
data-testid="profile-name-input" class="mw-460"
type="text" data-testid="profile-name-input"
/> type="text"
</gl-form-group> />
</gl-form-group>
<hr class="gl-border-gray-100" />
<gl-form-group :disabled="isPolicyProfile">
<template #label>
{{ s__('DastProfiles|Scan mode') }}
<tooltip-icon :title="i18n.tooltips.scanMode" />
</template>
<gl-form-radio-group <hr class="gl-border-gray-100" />
v-model="form.scanType.value"
:options="$options.SCAN_TYPE_OPTIONS"
data-testid="scan-type-option"
/>
</gl-form-group>
<div class="row"> <gl-form-group>
<gl-form-group
class="col-md-6 mb-0"
:disabled="isPolicyProfile"
:state="form.spiderTimeout.state"
:invalid-feedback="form.spiderTimeout.feedback"
>
<template #label> <template #label>
{{ s__('DastProfiles|Spider timeout') }} {{ s__('DastProfiles|Scan mode') }}
<tooltip-icon :title="i18n.tooltips.spiderTimeout" /> <tooltip-icon :title="i18n.tooltips.scanMode" />
</template> </template>
<gl-form-input-group
v-model.number="form.spiderTimeout.value" <gl-form-radio-group
class="mw-460" v-model="form.scanType.value"
data-testid="spider-timeout-input" :options="$options.SCAN_TYPE_OPTIONS"
type="number" data-testid="scan-type-option"
:min="$options.spiderTimeoutRange.min" />
:max="$options.spiderTimeoutRange.max" </gl-form-group>
@input="validateSpiderTimeout"
<div class="row">
<gl-form-group
class="col-md-6 mb-0"
:state="form.spiderTimeout.state"
:invalid-feedback="form.spiderTimeout.feedback"
> >
<template #append> <template #label>
<gl-input-group-text>{{ __('Minutes') }}</gl-input-group-text> {{ s__('DastProfiles|Spider timeout') }}
<tooltip-icon :title="i18n.tooltips.spiderTimeout" />
</template> </template>
</gl-form-input-group> <gl-form-input-group
<div class="gl-text-gray-400 gl-my-2"> v-model.number="form.spiderTimeout.value"
{{ s__('DastProfiles|Minimum = 0 (no timeout enabled), Maximum = 2880 minutes') }} class="mw-460"
</div> data-testid="spider-timeout-input"
</gl-form-group> type="number"
:min="$options.spiderTimeoutRange.min"
:max="$options.spiderTimeoutRange.max"
@input="validateSpiderTimeout"
>
<template #append>
<gl-input-group-text>{{ __('Minutes') }}</gl-input-group-text>
</template>
</gl-form-input-group>
<div class="gl-text-gray-400 gl-my-2">
{{ s__('DastProfiles|Minimum = 0 (no timeout enabled), Maximum = 2880 minutes') }}
</div>
</gl-form-group>
<gl-form-group <gl-form-group
class="col-md-6 mb-0" class="col-md-6 mb-0"
:disabled="isPolicyProfile" :state="form.targetTimeout.state"
:state="form.targetTimeout.state" :invalid-feedback="form.targetTimeout.feedback"
:invalid-feedback="form.targetTimeout.feedback"
>
<template #label>
{{ s__('DastProfiles|Target timeout') }}
<tooltip-icon :title="i18n.tooltips.targetTimeout" />
</template>
<gl-form-input-group
v-model.number="form.targetTimeout.value"
class="mw-460"
data-testid="target-timeout-input"
type="number"
:min="$options.targetTimeoutRange.min"
:max="$options.targetTimeoutRange.max"
@input="validateTargetTimeout"
> >
<template #append> <template #label>
<gl-input-group-text>{{ __('Seconds') }}</gl-input-group-text> {{ s__('DastProfiles|Target timeout') }}
<tooltip-icon :title="i18n.tooltips.targetTimeout" />
</template> </template>
</gl-form-input-group> <gl-form-input-group
<div class="gl-text-gray-400 gl-my-2"> v-model.number="form.targetTimeout.value"
{{ s__('DastProfiles|Minimum = 1 second, Maximum = 3600 seconds') }} class="mw-460"
</div> data-testid="target-timeout-input"
</gl-form-group> type="number"
</div> :min="$options.targetTimeoutRange.min"
:max="$options.targetTimeoutRange.max"
@input="validateTargetTimeout"
>
<template #append>
<gl-input-group-text>{{ __('Seconds') }}</gl-input-group-text>
</template>
</gl-form-input-group>
<div class="gl-text-gray-400 gl-my-2">
{{ s__('DastProfiles|Minimum = 1 second, Maximum = 3600 seconds') }}
</div>
</gl-form-group>
</div>
<hr class="gl-border-gray-100" /> <hr class="gl-border-gray-100" />
<div class="row"> <div class="row">
<gl-form-group class="col-md-6 mb-0" :disabled="isPolicyProfile"> <gl-form-group class="col-md-6 mb-0">
<template #label> <template #label>
{{ s__('DastProfiles|AJAX spider') }} {{ s__('DastProfiles|AJAX spider') }}
<tooltip-icon :title="i18n.tooltips.ajaxSpider" /> <tooltip-icon :title="i18n.tooltips.ajaxSpider" />
</template> </template>
<gl-form-checkbox v-model="form.useAjaxSpider.value">{{ <gl-form-checkbox v-model="form.useAjaxSpider.value">{{
s__('DastProfiles|Turn on AJAX spider') s__('DastProfiles|Turn on AJAX spider')
}}</gl-form-checkbox> }}</gl-form-checkbox>
</gl-form-group> </gl-form-group>
<gl-form-group class="col-md-6 mb-0" :disabled="isPolicyProfile"> <gl-form-group class="col-md-6 mb-0">
<template #label> <template #label>
{{ s__('DastProfiles|Debug messages') }} {{ s__('DastProfiles|Debug messages') }}
<tooltip-icon :title="i18n.tooltips.debugMessage" /> <tooltip-icon :title="i18n.tooltips.debugMessage" />
</template> </template>
<gl-form-checkbox v-model="form.showDebugMessages.value">{{ <gl-form-checkbox v-model="form.showDebugMessages.value">{{
s__('DastProfiles|Show debug messages') s__('DastProfiles|Show debug messages')
}}</gl-form-checkbox> }}</gl-form-checkbox>
</gl-form-group> </gl-form-group>
</div> </div>
</gl-form-group>
<hr class="gl-border-gray-100" /> <hr class="gl-border-gray-100" />
......
...@@ -82,96 +82,93 @@ export default { ...@@ -82,96 +82,93 @@ export default {
<template> <template>
<section> <section>
<gl-form-group :disabled="disabled" :label="s__('DastProfiles|Authentication')"> <gl-form-group data-testid="dast-site-auth-parent-group" :disabled="disabled">
<gl-form-checkbox v-model="form.fields.enabled.value" data-testid="auth-enable-checkbox">{{ <gl-form-group :label="s__('DastProfiles|Authentication')">
s__('DastProfiles|Enable Authentication') <gl-form-checkbox v-model="form.fields.enabled.value" data-testid="auth-enable-checkbox">{{
}}</gl-form-checkbox> s__('DastProfiles|Enable Authentication')
</gl-form-group> }}</gl-form-checkbox>
<div v-if="form.fields.enabled.value" data-testid="auth-form"> </gl-form-group>
<div class="row"> <div v-if="form.fields.enabled.value" data-testid="auth-form">
<gl-form-group <div class="row">
:disabled="disabled" <gl-form-group
:label="s__('DastProfiles|Authentication URL')" :label="s__('DastProfiles|Authentication URL')"
:invalid-feedback="form.fields.url.feedback" :invalid-feedback="form.fields.url.feedback"
class="col-md-6" class="col-md-6"
> >
<gl-form-input <gl-form-input
v-model="form.fields.url.value" v-model="form.fields.url.value"
v-validation:[showValidationOrInEditMode] v-validation:[showValidationOrInEditMode]
name="url" name="url"
type="url" type="url"
required required
:state="form.fields.url.state" :state="form.fields.url.state"
/> />
</gl-form-group> </gl-form-group>
</div> </div>
<div class="row"> <div class="row">
<gl-form-group <gl-form-group
:disabled="disabled" :label="s__('DastProfiles|Username')"
:label="s__('DastProfiles|Username')" :invalid-feedback="form.fields.username.feedback"
:invalid-feedback="form.fields.username.feedback" class="col-md-6"
class="col-md-6" >
> <gl-form-input
<gl-form-input v-model="form.fields.username.value"
v-model="form.fields.username.value" v-validation:[showValidationOrInEditMode]
v-validation:[showValidationOrInEditMode] autocomplete="off"
autocomplete="off" name="username"
name="username" type="text"
type="text" required
required :state="form.fields.username.state"
:state="form.fields.username.state" />
/> </gl-form-group>
</gl-form-group> <gl-form-group
<gl-form-group :label="s__('DastProfiles|Password')"
:disabled="disabled" :invalid-feedback="form.fields.password.feedback"
:label="s__('DastProfiles|Password')" class="col-md-6"
:invalid-feedback="form.fields.password.feedback" >
class="col-md-6" <gl-form-input
> v-model="form.fields.password.value"
<gl-form-input v-validation:[showValidationOrInEditMode]
v-model="form.fields.password.value" autocomplete="off"
v-validation:[showValidationOrInEditMode] name="password"
autocomplete="off" type="password"
name="password" :placeholder="sensitiveFieldPlaceholder"
type="password" :required="isSensitiveFieldRequired"
:placeholder="sensitiveFieldPlaceholder" :state="form.fields.password.state"
:required="isSensitiveFieldRequired" />
:state="form.fields.password.state" </gl-form-group>
/> </div>
</gl-form-group> <div class="row">
<gl-form-group
:label="s__('DastProfiles|Username form field')"
:invalid-feedback="form.fields.usernameField.feedback"
class="col-md-6"
>
<gl-form-input
v-model="form.fields.usernameField.value"
v-validation:[showValidationOrInEditMode]
name="usernameField"
type="text"
required
:state="form.fields.usernameField.state"
/>
</gl-form-group>
<gl-form-group
:label="s__('DastProfiles|Password form field')"
:invalid-feedback="form.fields.passwordField.feedback"
class="col-md-6"
>
<gl-form-input
v-model="form.fields.passwordField.value"
v-validation:[showValidationOrInEditMode]
name="passwordField"
type="text"
required
:state="form.fields.passwordField.state"
/>
</gl-form-group>
</div>
</div> </div>
<div class="row"> </gl-form-group>
<gl-form-group
:disabled="disabled"
:label="s__('DastProfiles|Username form field')"
:invalid-feedback="form.fields.usernameField.feedback"
class="col-md-6"
>
<gl-form-input
v-model="form.fields.usernameField.value"
v-validation:[showValidationOrInEditMode]
name="usernameField"
type="text"
required
:state="form.fields.usernameField.state"
/>
</gl-form-group>
<gl-form-group
:disabled="disabled"
:label="s__('DastProfiles|Password form field')"
:invalid-feedback="form.fields.passwordField.feedback"
class="col-md-6"
>
<gl-form-input
v-model="form.fields.passwordField.value"
v-validation:[showValidationOrInEditMode]
name="passwordField"
type="text"
required
:state="form.fields.passwordField.state"
/>
</gl-form-group>
</div>
</div>
</section> </section>
</template> </template>
...@@ -274,95 +274,90 @@ export default { ...@@ -274,95 +274,90 @@ export default {
</ul> </ul>
</gl-alert> </gl-alert>
<gl-form-group <gl-form-group data-testid="dast-site-parent-group" :disabled="isPolicyProfile">
:disabled="isPolicyProfile"
:label="s__('DastProfiles|Profile name')"
:invalid-feedback="form.fields.profileName.feedback"
>
<gl-form-input
v-model="form.fields.profileName.value"
v-validation:[form.showValidation]
name="profileName"
class="mw-460"
data-testid="profile-name-input"
type="text"
required
:state="form.fields.profileName.state"
/>
</gl-form-group>
<hr class="gl-border-gray-100" />
<gl-form-group
:disabled="isPolicyProfile"
data-testid="target-url-input-group"
:invalid-feedback="form.fields.targetUrl.feedback"
:label="s__('DastProfiles|Target URL')"
>
<gl-form-input
v-model="form.fields.targetUrl.value"
v-validation:[form.showValidation]
name="targetUrl"
class="mw-460"
data-testid="target-url-input"
required
type="url"
:state="form.fields.targetUrl.state"
/>
</gl-form-group>
<div v-if="glFeatures.securityDastSiteProfilesAdditionalFields" class="row">
<gl-form-group <gl-form-group
:disabled="isPolicyProfile" :label="s__('DastProfiles|Profile name')"
:label="s__('DastProfiles|Excluded URLs (Optional)')" :invalid-feedback="form.fields.profileName.feedback"
:invalid-feedback="form.fields.excludedUrls.feedback"
class="col-md-6"
> >
<template #label> <gl-form-input
{{ i18n.excludedUrls.label }} v-model="form.fields.profileName.value"
<tooltip-icon :title="i18n.excludedUrls.tooltip" /> v-validation:[form.showValidation]
<gl-form-text class="gl-mt-3">{{ i18n.excludedUrls.description }}</gl-form-text> name="profileName"
</template> class="mw-460"
<gl-form-textarea data-testid="profile-name-input"
v-model="form.fields.excludedUrls.value" type="text"
:maxlength="$options.MAX_CHAR_LIMIT_EXCLUDED_URLS" required
:placeholder="i18n.excludedUrls.placeholder" :state="form.fields.profileName.state"
:no-resize="false"
data-testid="excluded-urls-input"
/> />
<gl-form-text>{{
getCharacterLimitText(
form.fields.excludedUrls.value,
$options.MAX_CHAR_LIMIT_EXCLUDED_URLS,
)
}}</gl-form-text>
</gl-form-group> </gl-form-group>
<hr class="gl-border-gray-100" />
<gl-form-group <gl-form-group
:disabled="isPolicyProfile" data-testid="target-url-input-group"
:invalid-feedback="form.fields.requestHeaders.feedback" :invalid-feedback="form.fields.targetUrl.feedback"
class="col-md-6" :label="s__('DastProfiles|Target URL')"
> >
<template #label> <gl-form-input
{{ i18n.requestHeaders.label }} v-model="form.fields.targetUrl.value"
<tooltip-icon :title="i18n.requestHeaders.tooltip" /> v-validation:[form.showValidation]
<gl-form-text class="gl-mt-3">{{ i18n.requestHeaders.description }}</gl-form-text> name="targetUrl"
</template> class="mw-460"
<gl-form-textarea data-testid="target-url-input"
v-model="form.fields.requestHeaders.value" required
:maxlength="$options.MAX_CHAR_LIMIT_REQUEST_HEADERS" type="url"
:placeholder="i18n.requestHeaders.placeholder" :state="form.fields.targetUrl.state"
:no-resize="false"
data-testid="request-headers-input"
/> />
<gl-form-text>{{
getCharacterLimitText(
form.fields.requestHeaders.value,
$options.MAX_CHAR_LIMIT_REQUEST_HEADERS,
)
}}</gl-form-text>
</gl-form-group> </gl-form-group>
</div>
<div v-if="glFeatures.securityDastSiteProfilesAdditionalFields" class="row">
<gl-form-group
:label="s__('DastProfiles|Excluded URLs (Optional)')"
:invalid-feedback="form.fields.excludedUrls.feedback"
class="col-md-6"
>
<template #label>
{{ i18n.excludedUrls.label }}
<tooltip-icon :title="i18n.excludedUrls.tooltip" />
<gl-form-text class="gl-mt-3">{{ i18n.excludedUrls.description }}</gl-form-text>
</template>
<gl-form-textarea
v-model="form.fields.excludedUrls.value"
:maxlength="$options.MAX_CHAR_LIMIT_EXCLUDED_URLS"
:placeholder="i18n.excludedUrls.placeholder"
:no-resize="false"
data-testid="excluded-urls-input"
/>
<gl-form-text>{{
getCharacterLimitText(
form.fields.excludedUrls.value,
$options.MAX_CHAR_LIMIT_EXCLUDED_URLS,
)
}}</gl-form-text>
</gl-form-group>
<gl-form-group :invalid-feedback="form.fields.requestHeaders.feedback" class="col-md-6">
<template #label>
{{ i18n.requestHeaders.label }}
<tooltip-icon :title="i18n.requestHeaders.tooltip" />
<gl-form-text class="gl-mt-3">{{ i18n.requestHeaders.description }}</gl-form-text>
</template>
<gl-form-textarea
v-model="form.fields.requestHeaders.value"
:maxlength="$options.MAX_CHAR_LIMIT_REQUEST_HEADERS"
:placeholder="i18n.requestHeaders.placeholder"
:no-resize="false"
data-testid="request-headers-input"
/>
<gl-form-text>{{
getCharacterLimitText(
form.fields.requestHeaders.value,
$options.MAX_CHAR_LIMIT_REQUEST_HEADERS,
)
}}</gl-form-text>
</gl-form-group>
</div>
</gl-form-group>
<dast-site-auth-section <dast-site-auth-section
v-if="glFeatures.securityDastSiteProfilesAdditionalFields" v-if="glFeatures.securityDastSiteProfilesAdditionalFields"
......
import { GlForm, GlFormGroup, GlModal } from '@gitlab/ui'; import { GlForm, GlModal } from '@gitlab/ui';
import { within } from '@testing-library/dom'; import { within } from '@testing-library/dom';
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import merge from 'lodash/merge'; import merge from 'lodash/merge';
...@@ -40,7 +40,7 @@ describe('DAST Scanner Profile', () => { ...@@ -40,7 +40,7 @@ describe('DAST Scanner Profile', () => {
const withinComponent = () => within(wrapper.element); const withinComponent = () => within(wrapper.element);
const findByTestId = (testId) => wrapper.find(`[data-testid="${testId}"`); const findByTestId = (testId) => wrapper.find(`[data-testid="${testId}"`);
const findAllFormGroups = () => wrapper.findAllComponents(GlFormGroup); const findParentFormGroup = () => findByTestId('dast-scanner-parent-group');
const findForm = () => wrapper.find(GlForm); const findForm = () => wrapper.find(GlForm);
const findProfileNameInput = () => findByTestId('profile-name-input'); const findProfileNameInput = () => findByTestId('profile-name-input');
const findSpiderTimeoutInput = () => findByTestId('spider-timeout-input'); const findSpiderTimeoutInput = () => findByTestId('spider-timeout-input');
...@@ -294,9 +294,7 @@ describe('DAST Scanner Profile', () => { ...@@ -294,9 +294,7 @@ describe('DAST Scanner Profile', () => {
}); });
it('should enable all form groups', () => { it('should enable all form groups', () => {
expect( expect(findParentFormGroup().attributes('disabled')).toBe(undefined);
findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === undefined),
).toBe(true);
}); });
it('should show the policy profile alert', () => { it('should show the policy profile alert', () => {
...@@ -318,9 +316,7 @@ describe('DAST Scanner Profile', () => { ...@@ -318,9 +316,7 @@ describe('DAST Scanner Profile', () => {
}); });
it('should disable all form groups', () => { it('should disable all form groups', () => {
expect(findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === 'true')).toBe( expect(findParentFormGroup().attributes('disabled')).toBe('true');
true,
);
}); });
it('should disable the save button', () => { it('should disable the save button', () => {
......
import { GlFormCheckbox, GlFormGroup } from '@gitlab/ui'; import { GlFormCheckbox } from '@gitlab/ui';
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import DastSiteAuthSection from 'ee/security_configuration/dast_site_profiles_form/components/dast_site_auth_section.vue'; import DastSiteAuthSection from 'ee/security_configuration/dast_site_profiles_form/components/dast_site_auth_section.vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
...@@ -25,7 +25,7 @@ describe('DastSiteAuthSection', () => { ...@@ -25,7 +25,7 @@ describe('DastSiteAuthSection', () => {
wrapper.destroy(); wrapper.destroy();
}); });
const findAllFormGroups = () => wrapper.findAllComponents(GlFormGroup); const findParentFormGroup = () => wrapper.findByTestId('dast-site-auth-parent-group');
const findByNameAttribute = (name) => wrapper.find(`[name="${name}"]`); const findByNameAttribute = (name) => wrapper.find(`[name="${name}"]`);
const findAuthForm = () => wrapper.findByTestId('auth-form'); const findAuthForm = () => wrapper.findByTestId('auth-form');
const findAuthCheckbox = () => wrapper.find(GlFormCheckbox); const findAuthCheckbox = () => wrapper.find(GlFormCheckbox);
...@@ -121,18 +121,14 @@ describe('DastSiteAuthSection', () => { ...@@ -121,18 +121,14 @@ describe('DastSiteAuthSection', () => {
describe('when profile does not come from a policy', () => { describe('when profile does not come from a policy', () => {
it('should enable all form groups', () => { it('should enable all form groups', () => {
createComponent({ mountFn: shallowMount, fields: { enabled: true } }); createComponent({ mountFn: shallowMount, fields: { enabled: true } });
expect( expect(findParentFormGroup().attributes('disabled')).toBe(undefined);
findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === undefined),
).toBe(true);
}); });
}); });
describe('when profile does comes from a policy', () => { describe('when profile does comes from a policy', () => {
it('should disable all form groups', () => { it('should disable all form groups', () => {
createComponent({ mountFn: shallowMount, disabled: true, fields: { enabled: true } }); createComponent({ mountFn: shallowMount, disabled: true, fields: { enabled: true } });
expect(findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === 'true')).toBe( expect(findParentFormGroup().attributes('disabled')).toBe('true');
true,
);
}); });
}); });
}); });
......
import { GlForm, GlFormGroup, GlModal } from '@gitlab/ui'; import { GlForm, GlModal } from '@gitlab/ui';
import { within } from '@testing-library/dom'; import { within } from '@testing-library/dom';
import { createLocalVue, mount, shallowMount } from '@vue/test-utils'; import { createLocalVue, mount, shallowMount } from '@vue/test-utils';
import merge from 'lodash/merge'; import merge from 'lodash/merge';
...@@ -46,7 +46,7 @@ describe('DastSiteProfileForm', () => { ...@@ -46,7 +46,7 @@ describe('DastSiteProfileForm', () => {
const withinComponent = () => within(wrapper.element); const withinComponent = () => within(wrapper.element);
const findForm = () => wrapper.findComponent(GlForm); const findForm = () => wrapper.findComponent(GlForm);
const findAllFormGroups = () => wrapper.findAllComponents(GlFormGroup); const findParentFormGroup = () => wrapper.findByTestId('dast-site-parent-group');
const findAuthSection = () => wrapper.findComponent(DastSiteAuthSection); const findAuthSection = () => wrapper.findComponent(DastSiteAuthSection);
const findCancelModal = () => wrapper.findComponent(GlModal); const findCancelModal = () => wrapper.findComponent(GlModal);
const findByNameAttribute = (name) => wrapper.find(`[name="${name}"]`); const findByNameAttribute = (name) => wrapper.find(`[name="${name}"]`);
...@@ -346,9 +346,7 @@ describe('DastSiteProfileForm', () => { ...@@ -346,9 +346,7 @@ describe('DastSiteProfileForm', () => {
}); });
it('should enable all form groups', () => { it('should enable all form groups', () => {
expect( expect(findParentFormGroup().attributes('disabled')).toBe(undefined);
findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === undefined),
).toBe(true);
}); });
it('should show the policy profile alert', () => { it('should show the policy profile alert', () => {
...@@ -370,9 +368,7 @@ describe('DastSiteProfileForm', () => { ...@@ -370,9 +368,7 @@ describe('DastSiteProfileForm', () => {
}); });
it('should disable all form groups', () => { it('should disable all form groups', () => {
expect(findAllFormGroups().wrappers.every((w) => w.attributes('disabled') === 'true')).toBe( expect(findParentFormGroup().attributes('disabled')).toBe('true');
true,
);
}); });
it('should disable the save button', () => { it('should disable the save button', () => {
......
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