feat: Add an option to disable endConversation button (#4352)

This commit is contained in:
Pranav Raj S
2022-04-06 13:54:55 +05:30
committed by GitHub
parent 821b953ee9
commit 0b03e4b296
10 changed files with 81 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ import Vue from 'vue';
global.chatwootWebChannel = {
avatarUrl: 'https://test.url',
hasAConnectedAgentBot: 'AgentBot',
enabledFeatures: ['emoji_picker', 'attachments'],
enabledFeatures: ['emoji_picker', 'attachments', 'end_conversation'],
preChatFormOptions: { require_email: false, pre_chat_message: '' },
};
@@ -24,6 +24,7 @@ describe('configMixin', () => {
const vm = new Constructor().$mount();
const wrapper = createWrapper(vm);
expect(wrapper.vm.hasEmojiPickerEnabled).toBe(true);
expect(wrapper.vm.hasEndConversationEnabled).toBe(true);
expect(wrapper.vm.hasAttachmentsEnabled).toBe(true);
expect(wrapper.vm.hasAConnectedAgentBot).toBe(true);
expect(wrapper.vm.useInboxAvatarForBot).toBe(true);
@@ -31,7 +32,7 @@ describe('configMixin', () => {
expect(wrapper.vm.channelConfig).toEqual({
avatarUrl: 'https://test.url',
hasAConnectedAgentBot: 'AgentBot',
enabledFeatures: ['emoji_picker', 'attachments'],
enabledFeatures: ['emoji_picker', 'attachments', 'end_conversation'],
preChatFormOptions: {
pre_chat_message: '',
require_email: false,