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/integrations')
-rw-r--r--spec/frontend/integrations/edit/components/active_checkbox_spec.js16
-rw-r--r--spec/frontend/integrations/edit/components/jira_issues_fields_spec.js14
2 files changed, 7 insertions, 23 deletions
diff --git a/spec/frontend/integrations/edit/components/active_checkbox_spec.js b/spec/frontend/integrations/edit/components/active_checkbox_spec.js
index 76fd6dd3a48..0e56fb6454e 100644
--- a/spec/frontend/integrations/edit/components/active_checkbox_spec.js
+++ b/spec/frontend/integrations/edit/components/active_checkbox_spec.js
@@ -6,31 +6,27 @@ import { createStore } from '~/integrations/edit/store';
describe('ActiveCheckbox', () => {
let wrapper;
- const createComponent = (customStateProps = {}, isInheriting = false) => {
+ const createComponent = (customStateProps = {}, { isInheriting = false } = {}) => {
wrapper = mount(ActiveCheckbox, {
store: createStore({
customState: { ...customStateProps },
+ override: !isInheriting,
+ defaultState: isInheriting ? {} : undefined,
}),
- computed: {
- isInheriting: () => isInheriting,
- },
});
};
afterEach(() => {
- if (wrapper) {
- wrapper.destroy();
- wrapper = null;
- }
+ wrapper.destroy();
});
- const findGlFormCheckbox = () => wrapper.find(GlFormCheckbox);
+ const findGlFormCheckbox = () => wrapper.findComponent(GlFormCheckbox);
const findInputInCheckbox = () => findGlFormCheckbox().find('input');
describe('template', () => {
describe('is inheriting adminSettings', () => {
it('renders GlFormCheckbox as disabled', () => {
- createComponent({}, true);
+ createComponent({}, { isInheriting: true });
expect(findGlFormCheckbox().exists()).toBe(true);
expect(findInputInCheckbox().attributes('disabled')).toBe('disabled');
diff --git a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js
index d08a1904e06..f121a148f27 100644
--- a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js
+++ b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js
@@ -136,7 +136,7 @@ describe('JiraIssuesFields', () => {
describe('Vulnerabilities creation', () => {
beforeEach(() => {
- createComponent({ provide: { glFeatures: { jiraForVulnerabilities: true } } });
+ createComponent();
});
it.each([true, false])(
@@ -178,18 +178,6 @@ describe('JiraIssuesFields', () => {
expect(eventHubEmitSpy).toHaveBeenCalledWith('getJiraIssueTypes');
});
-
- describe('with "jiraForVulnerabilities" feature flag disabled', () => {
- beforeEach(async () => {
- createComponent({
- provide: { glFeatures: { jiraForVulnerabilities: false } },
- });
- });
-
- it('does not show section', () => {
- expect(findJiraForVulnerabilities().exists()).toBe(false);
- });
- });
});
});
});