"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_2 = require("@testing-library/react");
const ChatbotHeaderCloseButton_1 = require("./ChatbotHeaderCloseButton");
describe('ChatbotHeaderCloseButton', () => {
    it('should render ChatbotHeaderCloseButton', () => {
        const { container } = (0, react_2.render)(react_1.default.createElement(ChatbotHeaderCloseButton_1.ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: jest.fn() }));
        expect(container.querySelector('.custom-header-close-button')).toBeTruthy();
    });
    it('should call onClick handler when close button is pressed', () => {
        const onClick = jest.fn();
        (0, react_2.render)(react_1.default.createElement(ChatbotHeaderCloseButton_1.ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: onClick }));
        react_2.fireEvent.click(react_2.screen.getByRole('button', { name: 'Close' }));
        expect(onClick).toHaveBeenCalled();
    });
});
