"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var helpers_1 = require("./helpers");
describe('MoreAttributesButton helpers tests', function () {
    describe('preparedGroupedItems test', function () {
        var attrTypes = [
            {
                uri: 'attrtypeUri',
                label: 'Attribute type label'
            },
            {
                uri: 'attrtype/2/Uri',
                label: 'Next attribute type label'
            }
        ];
        it('should return exact structure of passed attrTypes', function () {
            expect((0, helpers_1.preparedGroupedItems)({ attrTypes: attrTypes })).toEqual([
                {
                    item: {
                        id: attrTypes[0].uri,
                        label: attrTypes[0].label,
                        attrType: attrTypes[0]
                    }
                },
                {
                    item: {
                        id: attrTypes[1].uri,
                        label: attrTypes[1].label,
                        attrType: attrTypes[1]
                    }
                }
            ]);
        });
        it('should return filtered structure of passed attrTypes if filter is set', function () {
            expect((0, helpers_1.preparedGroupedItems)({ attrTypes: attrTypes, filter: 'Next' })).toEqual([
                {
                    item: {
                        id: attrTypes[1].uri,
                        label: attrTypes[1].label,
                        attrType: attrTypes[1]
                    }
                }
            ]);
        });
    });
});
