mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { getInboxClassByType, getInboxWarningIconClass } from '../inbox';
 | 
						|
 | 
						|
describe('#Inbox Helpers', () => {
 | 
						|
  describe('getInboxClassByType', () => {
 | 
						|
    it('should return correct class for web widget', () => {
 | 
						|
      expect(getInboxClassByType('Channel::WebWidget')).toEqual(
 | 
						|
        'globe-desktop'
 | 
						|
      );
 | 
						|
    });
 | 
						|
    it('should return correct class for fb page', () => {
 | 
						|
      expect(getInboxClassByType('Channel::FacebookPage')).toEqual(
 | 
						|
        'brand-facebook'
 | 
						|
      );
 | 
						|
    });
 | 
						|
    it('should return correct class for  twitter profile', () => {
 | 
						|
      expect(getInboxClassByType('Channel::TwitterProfile')).toEqual(
 | 
						|
        'brand-twitter'
 | 
						|
      );
 | 
						|
    });
 | 
						|
    it('should return correct class for twilio sms', () => {
 | 
						|
      expect(getInboxClassByType('Channel::TwilioSms', '')).toEqual(
 | 
						|
        'brand-sms'
 | 
						|
      );
 | 
						|
    });
 | 
						|
    it('should return correct class for whatsapp', () => {
 | 
						|
      expect(getInboxClassByType('Channel::TwilioSms', 'whatsapp')).toEqual(
 | 
						|
        'brand-whatsapp'
 | 
						|
      );
 | 
						|
    });
 | 
						|
    it('should return correct class for Api', () => {
 | 
						|
      expect(getInboxClassByType('Channel::Api')).toEqual('cloud');
 | 
						|
    });
 | 
						|
    it('should return correct class for Email', () => {
 | 
						|
      expect(getInboxClassByType('Channel::Email')).toEqual('mail');
 | 
						|
    });
 | 
						|
  });
 | 
						|
 | 
						|
  describe('getInboxWarningIconClass', () => {
 | 
						|
    it('should return correct class for warning', () => {
 | 
						|
      expect(getInboxWarningIconClass('Channel::FacebookPage', true)).toEqual(
 | 
						|
        'warning'
 | 
						|
      );
 | 
						|
    });
 | 
						|
  });
 | 
						|
});
 |