"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 ChatbotAlert_1 = __importDefault(require("./ChatbotAlert"));
describe('ChatbotAlert', () => {
    it('should render ChatbotAlert with default variant', () => {
        (0, react_2.render)(react_1.default.createElement(ChatbotAlert_1.default, { title: "Chatbot Alert" }));
        expect(react_2.screen.getByText('Chatbot Alert')).toBeTruthy();
    });
    it('should render ChatbotAlert with children', () => {
        (0, react_2.render)(react_1.default.createElement(ChatbotAlert_1.default, { title: "Chatbot Alert" }, "Chatbot Alert Content"));
        expect(react_2.screen.getByText('Chatbot Alert Content')).toBeTruthy();
    });
    it('should call onClose handler when onClose button is clicked', () => {
        const onCloseHandler = jest.fn();
        (0, react_2.render)(react_1.default.createElement(ChatbotAlert_1.default, { title: "Chatbot Alert", onClose: onCloseHandler }, "Chatbot Alert Content"));
        expect(react_2.screen.getByText('Chatbot Alert')).toBeTruthy();
        expect(react_2.screen.getByText('Chatbot Alert Content')).toBeTruthy();
        // click on the close button
        react_2.fireEvent.click(react_2.screen.getByRole('button'));
        expect(onCloseHandler).toHaveBeenCalled();
    });
});
