summaryrefslogtreecommitdiff
path: root/spec/frontend/integrations/edit
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/frontend/integrations/edit
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/frontend/integrations/edit')
-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);
- });
- });
});
});
});