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/crm')
-rw-r--r--spec/frontend/crm/contact_form_wrapper_spec.js18
-rw-r--r--spec/frontend/crm/crm_form_spec.js (renamed from spec/frontend/crm/form_spec.js)4
-rw-r--r--spec/frontend/crm/organization_form_wrapper_spec.js4
3 files changed, 13 insertions, 13 deletions
diff --git a/spec/frontend/crm/contact_form_wrapper_spec.js b/spec/frontend/crm/contact_form_wrapper_spec.js
index e49b553e4b5..50b432943fb 100644
--- a/spec/frontend/crm/contact_form_wrapper_spec.js
+++ b/spec/frontend/crm/contact_form_wrapper_spec.js
@@ -4,7 +4,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import waitForPromises from 'helpers/wait_for_promises';
import createMockApollo from 'helpers/mock_apollo_helper';
import ContactFormWrapper from '~/crm/contacts/components/contact_form_wrapper.vue';
-import ContactForm from '~/crm/components/form.vue';
+import CrmForm from '~/crm/components/crm_form.vue';
import getGroupContactsQuery from '~/crm/contacts/components/graphql/get_group_contacts.query.graphql';
import createContactMutation from '~/crm/contacts/components/graphql/create_contact.mutation.graphql';
import updateContactMutation from '~/crm/contacts/components/graphql/update_contact.mutation.graphql';
@@ -16,7 +16,7 @@ describe('Customer relations contact form wrapper', () => {
let wrapper;
let fakeApollo;
- const findContactForm = () => wrapper.findComponent(ContactForm);
+ const findCrmForm = () => wrapper.findComponent(CrmForm);
const $route = {
params: {
@@ -65,21 +65,21 @@ describe('Customer relations contact form wrapper', () => {
});
it('renders correct getQuery prop', () => {
- expect(findContactForm().props('getQueryNodePath')).toBe('group.contacts');
+ expect(findCrmForm().props('getQueryNodePath')).toBe('group.contacts');
});
it('renders correct mutation prop', () => {
- expect(findContactForm().props('mutation')).toBe(mutation);
+ expect(findCrmForm().props('mutation')).toBe(mutation);
});
it('renders correct additionalCreateParams prop', () => {
- expect(findContactForm().props('additionalCreateParams')).toMatchObject({
+ expect(findCrmForm().props('additionalCreateParams')).toMatchObject({
groupId: 'gid://gitlab/Group/26',
});
});
it('renders correct existingId prop', () => {
- expect(findContactForm().props('existingId')).toBe(existingId);
+ expect(findCrmForm().props('existingId')).toBe(existingId);
});
it('renders correct fields prop', () => {
@@ -101,15 +101,15 @@ describe('Customer relations contact form wrapper', () => {
{ name: 'description', label: 'Description' },
];
if (isEditMode) fields.push({ name: 'active', label: 'Active', required: true, bool: true });
- expect(findContactForm().props('fields')).toEqual(fields);
+ expect(findCrmForm().props('fields')).toEqual(fields);
});
it('renders correct title prop', () => {
- expect(findContactForm().props('title')).toBe(title);
+ expect(findCrmForm().props('title')).toBe(title);
});
it('renders correct successMessage prop', () => {
- expect(findContactForm().props('successMessage')).toBe(successMessage);
+ expect(findCrmForm().props('successMessage')).toBe(successMessage);
});
});
});
diff --git a/spec/frontend/crm/form_spec.js b/spec/frontend/crm/crm_form_spec.js
index 57e28b396cf..eabcf5b1b1b 100644
--- a/spec/frontend/crm/form_spec.js
+++ b/spec/frontend/crm/crm_form_spec.js
@@ -5,7 +5,7 @@ import VueRouter from 'vue-router';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import Form from '~/crm/components/form.vue';
+import CrmForm from '~/crm/components/crm_form.vue';
import routes from '~/crm/contacts/routes';
import createContactMutation from '~/crm/contacts/components/graphql/create_contact.mutation.graphql';
import updateContactMutation from '~/crm/contacts/components/graphql/update_contact.mutation.graphql';
@@ -81,7 +81,7 @@ describe('Reusable form component', () => {
const findFormGroup = (at) => wrapper.findAllComponents(GlFormGroup).at(at);
const mountComponent = (propsData) => {
- wrapper = shallowMountExtended(Form, {
+ wrapper = shallowMountExtended(CrmForm, {
router,
apolloProvider: fakeApollo,
propsData: { drawerOpen: true, ...propsData },
diff --git a/spec/frontend/crm/organization_form_wrapper_spec.js b/spec/frontend/crm/organization_form_wrapper_spec.js
index 9f26b9157e6..d795c585622 100644
--- a/spec/frontend/crm/organization_form_wrapper_spec.js
+++ b/spec/frontend/crm/organization_form_wrapper_spec.js
@@ -1,6 +1,6 @@
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import OrganizationFormWrapper from '~/crm/organizations/components/organization_form_wrapper.vue';
-import OrganizationForm from '~/crm/components/form.vue';
+import CrmForm from '~/crm/components/crm_form.vue';
import getGroupOrganizationsQuery from '~/crm/organizations/components/graphql/get_group_organizations.query.graphql';
import createOrganizationMutation from '~/crm/organizations/components/graphql/create_organization.mutation.graphql';
import updateOrganizationMutation from '~/crm/organizations/components/graphql/update_organization.mutation.graphql';
@@ -8,7 +8,7 @@ import updateOrganizationMutation from '~/crm/organizations/components/graphql/u
describe('Customer relations organization form wrapper', () => {
let wrapper;
- const findOrganizationForm = () => wrapper.findComponent(OrganizationForm);
+ const findOrganizationForm = () => wrapper.findComponent(CrmForm);
const $apollo = {
queries: {