import { jsx as _jsx } from "react/jsx-runtime";
import { render, screen } from '@testing-library/react';
import ButtonClose from '../ButtonClose';
import ButtonKDS from '../ButtonKDS';
import { ThemeProvider } from 'styled-components';
const theme = {
    colors: {
        main: '#000',
        default: '#fff',
        success: 'rgb(71, 176, 75)',
        background: '#ffc200',
    },
    fontSizes: {
        medium: '16px',
    },
};
const KDSTheme = ({ children }) => (_jsx(ThemeProvider, Object.assign({ theme: theme }, { children: children }), void 0));
const mockedSetZoomIn = jest.fn();
describe('ButtonClose', () => {
    it('should render button close element', () => {
        render(_jsx(ButtonClose, { setIsZoomIn: mockedSetZoomIn }, void 0));
        const buttonElement = screen.getByTestId('close-button');
        expect(buttonElement).toBeInTheDocument();
    });
    it('should render zoom in button', () => {
        render(_jsx(KDSTheme, { children: _jsx(ButtonKDS, { isIcon: true, text: "Zoom In", type: "white" }, void 0) }, void 0));
        const buttonElement = screen.getByText('Zoom In');
        expect(buttonElement).toBeInTheDocument();
    });
    it('should render white button', () => {
        render(_jsx(KDSTheme, { children: _jsx(ButtonKDS, { isIcon: false, text: "Zoom In", type: "white" }, void 0) }, void 0));
        const buttonElement = screen.getByText('Zoom In');
        expect(buttonElement).toHaveStyle('background-color:#fff');
    });
    it('should render button with icon', () => {
        render(_jsx(KDSTheme, { children: _jsx(ButtonKDS, { isIcon: true, text: "Zoom In", type: "white" }, void 0) }, void 0));
        const buttonElement = screen.getByText('Zoom In');
        const graphicElement = screen.getByTestId('magnifier-icon');
        expect(buttonElement).toContainElement(graphicElement);
    });
    it('should render success button', () => {
        render(_jsx(KDSTheme, { children: _jsx(ButtonKDS, { isIcon: true, text: "Zoom In", type: "large" }, void 0) }, void 0));
        const buttonElement = screen.getByText('Zoom In');
        expect(buttonElement).toHaveStyle('background-color:rgb(71, 176, 75)');
    });
});
//# sourceMappingURL=ButtonClose.test.js.map