Merge branch 'develop' into feat/v5-ui-redesign

This commit is contained in:
Sivin Varghese
2025-12-17 22:54:42 +05:30
committed by GitHub
94 changed files with 2759 additions and 136 deletions
@@ -165,6 +165,13 @@ export const getters = {
item.channel_type === INBOX_TYPES.INSTAGRAM
);
},
getTiktokInboxByBusinessId: $state => businessId => {
return $state.records.find(
item =>
item.business_id === businessId &&
item.channel_type === INBOX_TYPES.TIKTOK
);
},
};
const sendAnalyticsEvent = channelType => {
@@ -71,4 +71,12 @@ export default [
instagram_id: 123456789,
provider: 'default',
},
{
id: 8,
channel_id: 8,
name: 'Test TikTok 1',
channel_type: 'Channel::Tiktok',
business_id: 123456789,
provider: 'default',
},
];
@@ -27,7 +27,7 @@ describe('#getters', () => {
it('dialogFlowEnabledInboxes', () => {
const state = { records: inboxList };
expect(getters.dialogFlowEnabledInboxes(state).length).toEqual(7);
expect(getters.dialogFlowEnabledInboxes(state).length).toEqual(8);
});
it('getInbox', () => {
@@ -95,6 +95,18 @@ describe('#getters', () => {
});
});
it('getTiktokInboxByBusinessId', () => {
const state = { records: inboxList };
expect(getters.getTiktokInboxByBusinessId(state)(123456789)).toEqual({
id: 8,
channel_id: 8,
name: 'Test TikTok 1',
channel_type: 'Channel::Tiktok',
business_id: 123456789,
provider: 'default',
});
});
describe('getFilteredWhatsAppTemplates', () => {
it('returns empty array when inbox not found', () => {
const state = { records: [] };