feat: Add an action in Macro to change the priority (#6940)
This commit is contained in:
@@ -36,6 +36,7 @@ describe('#resolveActionName', () => {
|
||||
expect(resolveActionName(MACRO_ACTION_TYPES[1].key)).not.toEqual(
|
||||
MACRO_ACTION_TYPES[0].label
|
||||
);
|
||||
expect(resolveActionName('change_priority')).toEqual('Change Priority');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PRIORITY_CONDITION_VALUES } from 'dashboard/helper/automationHelper.js';
|
||||
export default {
|
||||
methods: {
|
||||
getDropdownValues(type) {
|
||||
@@ -15,6 +16,8 @@ export default {
|
||||
name: i.title,
|
||||
};
|
||||
});
|
||||
case 'change_priority':
|
||||
return PRIORITY_CONDITION_VALUES;
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { createWrapper } from '@vue/test-utils';
|
||||
import macrosMixin from '../macrosMixin';
|
||||
import Vue from 'vue';
|
||||
import { teams, labels, agents } from '../../helper/specs/macrosFixtures';
|
||||
import { PRIORITY_CONDITION_VALUES } from 'dashboard/helper/automationHelper.js';
|
||||
describe('webhookMixin', () => {
|
||||
describe('#getEventLabel', () => {
|
||||
it('returns correct i18n translation:', () => {
|
||||
@@ -37,6 +38,9 @@ describe('webhookMixin', () => {
|
||||
expect(wrapper.vm.getDropdownValues('send_email_to_team')).toEqual(teams);
|
||||
expect(wrapper.vm.getDropdownValues('add_label')).toEqual(resolvedLabels);
|
||||
expect(wrapper.vm.getDropdownValues('assign_agent')).toEqual(agents);
|
||||
expect(wrapper.vm.getDropdownValues('change_priority')).toEqual(
|
||||
PRIORITY_CONDITION_VALUES
|
||||
);
|
||||
expect(wrapper.vm.getDropdownValues()).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,4 +59,9 @@ export const MACRO_ACTION_TYPES = [
|
||||
label: 'Add a private note',
|
||||
inputType: 'textarea',
|
||||
},
|
||||
{
|
||||
key: 'change_priority',
|
||||
label: 'Change Priority',
|
||||
inputType: 'search_select',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user