"use strict";
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);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var react_2 = require("@testing-library/react");
var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
var types_1 = require("../../../types");
var GroupActivity_1 = require("./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_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: { metadata: metadata } }, children));
    };
    return (0, react_2.render)(react_1.default.createElement(GroupActivity_1.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: types_1.ActivityTypes.GROUP_CHANGED, data: data };
        setUp(props);
        react_2.screen.getByText('Group updated');
        react_2.screen.getByText('Test group');
    });
});
