Fix spec fixtures
This commit is contained in:
parent
ea5e7ce6ba
commit
40a7681d45
3 changed files with 5 additions and 18 deletions
|
@ -656,6 +656,7 @@ export const automationToSubmit = {
|
||||||
filter_operator: 'equal_to',
|
filter_operator: 'equal_to',
|
||||||
values: [{ id: 'open', name: 'Open' }],
|
values: [{ id: 'open', name: 'Open' }],
|
||||||
query_operator: 'and',
|
query_operator: 'and',
|
||||||
|
custom_attribute_type: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
|
|
|
@ -187,6 +187,7 @@ describe('automationMethodsMixin', () => {
|
||||||
filter_operator: 'equal_to',
|
filter_operator: 'equal_to',
|
||||||
values: '',
|
values: '',
|
||||||
query_operator: 'and',
|
query_operator: 'and',
|
||||||
|
custom_attribute_type: '',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const genericConditionModel = [
|
const genericConditionModel = [
|
||||||
|
@ -195,6 +196,7 @@ describe('automationMethodsMixin', () => {
|
||||||
filter_operator: 'equal_to',
|
filter_operator: 'equal_to',
|
||||||
values: '',
|
values: '',
|
||||||
query_operator: 'and',
|
query_operator: 'and',
|
||||||
|
custom_attribute_type: '',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
expect(helpers.getDefaultConditions('message_created')).toEqual(
|
expect(helpers.getDefaultConditions('message_created')).toEqual(
|
||||||
|
|
|
@ -193,6 +193,7 @@ describe('automationMethodsMixin', () => {
|
||||||
filter_operator: 'equal_to',
|
filter_operator: 'equal_to',
|
||||||
values: '',
|
values: '',
|
||||||
query_operator: 'and',
|
query_operator: 'and',
|
||||||
|
custom_attribute_type: '',
|
||||||
};
|
};
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
|
@ -287,24 +288,7 @@ describe('automationMethodsMixin', () => {
|
||||||
filter_operator: 'equal_to',
|
filter_operator: 'equal_to',
|
||||||
values: '',
|
values: '',
|
||||||
query_operator: 'and',
|
query_operator: 'and',
|
||||||
};
|
custom_attribute_type: '',
|
||||||
const wrapper = createComponent([methodsMixin], data);
|
|
||||||
wrapper.vm.resetFilter(0, automationToSubmit.conditions[0]);
|
|
||||||
expect(automation.conditions[0]).toEqual(conditionAfterReset);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('resetFilter resets the current automation conditions', () => {
|
|
||||||
const data = () => {
|
|
||||||
return {
|
|
||||||
automation: automationToSubmit,
|
|
||||||
automationTypes: AUTOMATIONS,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
const conditionAfterReset = {
|
|
||||||
attribute_key: 'status',
|
|
||||||
filter_operator: 'equal_to',
|
|
||||||
values: '',
|
|
||||||
query_operator: 'and',
|
|
||||||
};
|
};
|
||||||
const wrapper = createComponent([methodsMixin], data);
|
const wrapper = createComponent([methodsMixin], data);
|
||||||
wrapper.vm.resetFilter(0, automationToSubmit.conditions[0]);
|
wrapper.vm.resetFilter(0, automationToSubmit.conditions[0]);
|
||||||
|
|
Loading…
Reference in a new issue