Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js')
-rw-r--r--spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js21
1 files changed, 2 insertions, 19 deletions
diff --git a/spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js
index 79c2f811c08..3eecdeb5b1f 100644
--- a/spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js
+++ b/spec/frontend/packages_and_registries/settings/group/components/duplicates_settings_spec.js
@@ -4,8 +4,6 @@ import component from '~/packages_and_registries/settings/group/components/dupli
import {
DUPLICATES_TOGGLE_LABEL,
- DUPLICATES_ALLOWED_ENABLED,
- DUPLICATES_ALLOWED_DISABLED,
DUPLICATES_SETTING_EXCEPTION_TITLE,
DUPLICATES_SETTINGS_EXCEPTION_LEGEND,
} from '~/packages_and_registries/settings/group/constants';
@@ -36,7 +34,6 @@ describe('Duplicates Settings', () => {
});
const findToggle = () => wrapper.findComponent(GlToggle);
- const findToggleLabel = () => wrapper.find('[data-testid="toggle-label"');
const findInputGroup = () => wrapper.findComponent(GlFormGroup);
const findInput = () => wrapper.findComponent(GlFormInput);
@@ -47,7 +44,7 @@ describe('Duplicates Settings', () => {
expect(findToggle().exists()).toBe(true);
expect(findToggle().props()).toMatchObject({
label: DUPLICATES_TOGGLE_LABEL,
- value: defaultProps.duplicatesAllowed,
+ value: !defaultProps.duplicatesAllowed,
});
});
@@ -57,18 +54,11 @@ describe('Duplicates Settings', () => {
findToggle().vm.$emit('change', false);
expect(wrapper.emitted('update')).toStrictEqual([
- [{ [defaultProps.modelNames.allowed]: false }],
+ [{ [defaultProps.modelNames.allowed]: true }],
]);
});
describe('when the duplicates are disabled', () => {
- it('the toggle has the disabled message', () => {
- mountComponent();
-
- expect(findToggleLabel().exists()).toBe(true);
- expect(findToggleLabel().text()).toMatchInterpolatedText(DUPLICATES_ALLOWED_DISABLED);
- });
-
it('shows a form group with an input field', () => {
mountComponent();
@@ -130,13 +120,6 @@ describe('Duplicates Settings', () => {
});
describe('when the duplicates are enabled', () => {
- it('has the correct toggle label', () => {
- mountComponent({ ...defaultProps, duplicatesAllowed: true });
-
- expect(findToggleLabel().exists()).toBe(true);
- expect(findToggleLabel().text()).toMatchInterpolatedText(DUPLICATES_ALLOWED_ENABLED);
- });
-
it('hides the form input group', () => {
mountComponent({ ...defaultProps, duplicatesAllowed: true });