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 { TenantIcon } from './TenantIcon';
describe('TenantIcon tests', function () {
    var defaultTenant = { id: 'uitest1' };
    it('should apply styles correctly', function () {
        render(React.createElement(TenantIcon, { tenant: defaultTenant }));
        expect(screen.getByTestId('reltio-tenant-icon')).toHaveStyle({
            backgroundColor: '#fccde5',
            color: '#212121'
        });
    });
    it('should render correct text if tenant has "name" prop', function () {
        var tenant = __assign(__assign({}, defaultTenant), { name: 'Reltio test tenant' });
        render(React.createElement(TenantIcon, { tenant: tenant }));
        screen.getByText('R');
    });
    it('should render correct text if tenant has not "name" prop', function () {
        render(React.createElement(TenantIcon, { tenant: defaultTenant }));
        screen.getByText('U');
    });
});
