feat: Custom fields in pre-chat form (#4189)
This commit is contained in:
@@ -2,6 +2,26 @@ import { getters } from '../../attributes';
|
||||
import attributesList from './fixtures';
|
||||
|
||||
describe('#getters', () => {
|
||||
it('getAttributes', () => {
|
||||
const state = { records: attributesList };
|
||||
expect(getters.getAttributes(state)).toEqual([
|
||||
{
|
||||
attribute_display_name: 'Language',
|
||||
attribute_display_type: 1,
|
||||
attribute_description: 'The conversation language',
|
||||
attribute_key: 'language',
|
||||
attribute_model: 0,
|
||||
},
|
||||
{
|
||||
attribute_display_name: 'Language one',
|
||||
attribute_display_type: 2,
|
||||
attribute_description: 'The conversation language one',
|
||||
attribute_key: 'language_one',
|
||||
attribute_model: 1,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('getAttributesByModel', () => {
|
||||
const state = { records: attributesList };
|
||||
expect(getters.getAttributesByModel(state)(1)).toEqual([
|
||||
|
||||
Reference in New Issue
Block a user