Update spec

This commit is contained in:
Pranav
2026-05-19 17:23:34 -07:00
parent 3509a98eb2
commit fe87933223
21 changed files with 719 additions and 29 deletions
@@ -53,6 +53,7 @@ const mockStore = createStore({
voice_enabled: true,
},
15: { id: 15, channel_type: INBOX_TYPES.TIKTOK },
16: { id: 16, channel_type: INBOX_TYPES.GOOGLE_PLAY },
};
return inboxes[id] || null;
},
@@ -226,6 +227,12 @@ describe('useInbox', () => {
global: { plugins: [mockStore] },
});
expect(wrapper.vm.isATiktokChannel).toBe(true);
// Test Google Play
wrapper = mount(createTestComponent(16), {
global: { plugins: [mockStore] },
});
expect(wrapper.vm.isAGooglePlayChannel).toBe(true);
});
});
@@ -278,6 +285,7 @@ describe('useInbox', () => {
'isAnEmailChannel',
'isAnInstagramChannel',
'isATiktokChannel',
'isAGooglePlayChannel',
'voiceCallEnabled',
'voiceCallProvider',
];
@@ -249,6 +249,14 @@ export default {
];
}
// Google Play has no support for bots, business hours, or CSAT — strip those tabs
if (this.isAGooglePlayChannel) {
const unsupportedKeys = ['business-hours', 'csat', 'bot-configuration'];
visibleToAllChannelTabs = visibleToAllChannelTabs.filter(
tab => !unsupportedKeys.includes(tab.key)
);
}
return visibleToAllChannelTabs;
},
currentInboxId() {
@@ -282,6 +290,9 @@ export default {
if (this.isAnEmailChannel) {
return `${this.inbox.name} (${this.inbox.email})`;
}
if (this.isAGooglePlayChannel && this.inbox.app_id) {
return `${this.inbox.name} (${this.inbox.app_id})`;
}
return this.inbox.name;
},
canLocktoSingleConversation() {
@@ -829,6 +840,7 @@ export default {
</SettingsFieldSection>
<SettingsFieldSection
v-if="!isAGooglePlayChannel"
:label="$t('INBOX_MGMT.HELP_CENTER.LABEL')"
:help-text="$t('INBOX_MGMT.HELP_CENTER.SUB_TEXT')"
>
@@ -1128,6 +1140,7 @@ export default {
</SettingsAccordion>
<SettingsAccordion
v-if="!isAGooglePlayChannel"
:title="$t('INBOX_MGMT.CHANNEL_PREFERENCES')"
class="mt-6"
>