2022-06-07 12:20:51 +00:00
|
|
|
import { getInboxClassByType, getInboxWarningIconClass } from '../inbox';
|
2021-03-09 14:22:14 +00:00
|
|
|
|
|
|
|
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
|
|
|
});
|
|
|
|
});
|
2022-06-07 12:20:51 +00:00
|
|
|
|
|
|
|
describe('getInboxWarningIconClass', () => {
|
|
|
|
it('should return correct class for warning', () => {
|
|
|
|
expect(getInboxWarningIconClass('Channel::FacebookPage', true)).toEqual(
|
|
|
|
'warning'
|
|
|
|
);
|
|
|
|
});
|
2022-06-08 12:37:45 +00:00
|
|
|
});
|
2021-03-09 14:22:14 +00:00
|
|
|
});
|