var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
import { getSelectorActivityTypes } from './helpers';
var groupTypes = ['GROUP_CREATED', 'GROUP_REMOVED', 'GROUP_CHANGED'];
var otherTypes = [
    'MODEL_UPDATED',
    'ENTITY_REMOVED',
    'ENTITY_CREATED',
    'ENTITY_CHANGED',
    'ENTITIES_MERGED',
    'ENTITIES_SPLITTED',
    'ENTITY_LOST_MERGE',
    'RELATIONSHIP_CREATED',
    'RELATIONSHIP_REMOVED',
    'RELATIONSHIP_CHANGED',
    'POTENTIAL_MATCHES_FOUND',
    'NOT_MATCHES_SET',
    'NOT_MATCHES_RESET',
    'PERIODIC_TASK_SCHEDULED',
    'ENTITIES_MERGED_MANUALLY',
    'POTENTIAL_MATCHES_REMOVED',
    'ENTITIES_MERGED_ON_THE_FLY',
    'USER_LOGIN',
    'USER_LOGOUT',
    'USER_SEARCH',
    'USER_PROFILE_VIEW',
    'COMMENT_ADDED',
    'COMMENT_UPDATED',
    'COMMENT_DELETED',
    'ANALYTICS_ATTRIBUTES_CHANGED',
    'ATTRIBUTE_UNMASKED',
    'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE'
];
var segmentTypes = ['SEGMENT_CREATE', 'SEGMENT_DELETE', 'SEGMENT_UPDATE'];
var interactionTypes = ['INTERACTION_CREATE', 'INTERACTION_UPDATE'];
var profileTypes = [
    'ENTITY_CREATED',
    'ENTITY_CHANGED',
    'ENTITIES_MERGED',
    'ENTITIES_SPLITTED',
    'ENTITY_LOST_MERGE',
    'RELATIONSHIP_CREATED',
    'RELATIONSHIP_REMOVED',
    'RELATIONSHIP_CHANGED',
    'POTENTIAL_MATCHES_FOUND',
    'POTENTIAL_MATCHES_REMOVED',
    'NOT_MATCHES_SET',
    'NOT_MATCHES_RESET',
    'ENTITIES_MERGED_MANUALLY',
    'ENTITIES_MERGED_ON_THE_FLY',
    'ATTRIBUTE_UNMASKED'
];
describe('helpers tests', function () {
    describe('getSelectorActivityTypes tests', function () {
        it('should return ActivityTypes without groupRelated when groupTypes is undefined', function () {
            var metadata = {
                entityTypes: []
            };
            expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), segmentTypes, true), interactionTypes, true));
        });
        it('should return ActivityTypes with groupRelated when groupTypes is not empty', function () {
            var metadata = {
                entityTypes: [],
                groupTypes: [
                    {
                        uri: 'test',
                        dataLabel: '',
                        dataLabelPattern: '',
                        dataTooltipPattern: '',
                        description: '',
                        groupElements: {
                            entityTypeURIs: [],
                            uri: ''
                        },
                        hasPrimaryMember: false,
                        label: '',
                        memberTypes: [],
                        multiplePrimaryMembers: false,
                        type: ''
                    }
                ]
            };
            expect(getSelectorActivityTypes(metadata)).toEqual(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], otherTypes, true), groupTypes, true), segmentTypes, true), interactionTypes, true));
        });
        it('should return profile related ActivityTypes when entityType passed', function () {
            var metadata = {
                entityTypes: []
            };
            expect(getSelectorActivityTypes(metadata, { attributes: [], uri: 'test' })).toEqual(profileTypes);
        });
    });
});
