mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Chore: View form responses as user messages (#876)
* Chore: View form responses as user messages
This commit is contained in:
		@@ -0,0 +1,24 @@
 | 
			
		||||
import { isASubmittedFormMessage, isAFormMessage } from '../MessageTypeHelper';
 | 
			
		||||
 | 
			
		||||
describe('#isASubmittedFormMessage', () => {
 | 
			
		||||
  it('should return correct value', () => {
 | 
			
		||||
    expect(
 | 
			
		||||
      isASubmittedFormMessage({
 | 
			
		||||
        content_type: 'form',
 | 
			
		||||
        content_attributes: {
 | 
			
		||||
          submitted_values: [{ name: 'text', value: 'Text ' }],
 | 
			
		||||
        },
 | 
			
		||||
      })
 | 
			
		||||
    ).toEqual(true);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
describe('#isAFormMessage', () => {
 | 
			
		||||
  it('should return correct value', () => {
 | 
			
		||||
    expect(
 | 
			
		||||
      isAFormMessage({
 | 
			
		||||
        content_type: 'form',
 | 
			
		||||
      })
 | 
			
		||||
    ).toEqual(true);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user