2021-03-09 14:22:14 +00:00
|
|
|
import { getInboxClassByType } from '../inbox';
|
|
|
|
|
|
|
|
describe('#Inbox Helpers', () => {
|
|
|
|
describe('getInboxClassByType', () => {
|
|
|
|
it('should return correct class for web widget', () => {
|
2021-12-01 05:03:18 +00:00
|
|
|
expect(getInboxClassByType('Channel::WebWidget')).toEqual(
|
|
|
|
'globe-desktop'
|
|
|
|
);
|
2021-03-09 14:22:14 +00:00
|
|
|
});
|
|
|
|
it('should return correct class for fb page', () => {
|
|
|
|
expect(getInboxClassByType('Channel::FacebookPage')).toEqual(
|
2021-12-01 05:03:18 +00:00
|
|
|
'brand-facebook'
|
2021-03-09 14:22:14 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
it('should return correct class for twitter profile', () => {
|
|
|
|
expect(getInboxClassByType('Channel::TwitterProfile')).toEqual(
|
2021-12-01 05:03:18 +00:00
|
|
|
'brand-twitter'
|
2021-03-09 14:22:14 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
it('should return correct class for twilio sms', () => {
|
|
|
|
expect(getInboxClassByType('Channel::TwilioSms', '')).toEqual(
|
2021-12-01 05:03:18 +00:00
|
|
|
'brand-sms'
|
2021-03-09 14:22:14 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
it('should return correct class for whatsapp', () => {
|
|
|
|
expect(getInboxClassByType('Channel::TwilioSms', 'whatsapp')).toEqual(
|
2021-12-01 05:03:18 +00:00
|
|
|
'brand-whatsapp'
|
2021-03-09 14:22:14 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
it('should return correct class for Api', () => {
|
2021-12-01 05:03:18 +00:00
|
|
|
expect(getInboxClassByType('Channel::Api')).toEqual('cloud');
|
2021-03-09 14:22:14 +00:00
|
|
|
});
|
|
|
|
it('should return correct class for Email', () => {
|
2021-12-01 05:03:18 +00:00
|
|
|
expect(getInboxClassByType('Channel::Email')).toEqual('mail');
|
2021-03-09 14:22:14 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|