var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import { render, screen } from '@testing-library/react';
import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
import { ActivityTypes } from '../../../types';
import { GroupActivity } from './GroupActivity';
var metadata = {
    groupTypes: [{ uri: 'configuration/groupTypes/Test', label: 'Test group' }]
};
var setUp = function (props) {
    var Providers = function (_a) {
        var children = _a.children;
        return (React.createElement(MdmModuleProvider, { values: { metadata: metadata } }, children));
    };
    return render(React.createElement(GroupActivity, __assign({}, props)), { wrapper: Providers });
};
describe('Group activity tests', function () {
    it('should render correctly', function () {
        var data = {
            uri: 'activities/d6e61e96-6310-434a-99f9-e694e5f35475',
            user: 'alexander.kirsanov',
            timestamp: 1621874356842,
            items: [{ id: 'sh2Ks8AN', timestamp: 1621874356842, objectType: 'configuration/groupTypes/Test' }],
            itemsTotal: 1
        };
        var props = { type: ActivityTypes.GROUP_CHANGED, data: data };
        setUp(props);
        screen.getByText('Group updated');
        screen.getByText('Test group');
    });
});
