// TODO : update tests based on new button
// import { useState } from "react";
// import "@testing-library/jest-dom";
// import { screen, render, waitFor } from "@testing-library/react";
// import { default as Modal } from './Modal';
// import Button from "../buttons/Button";
// import { click } from "../../../__mocks__/eventMock";
// const Template = (args: any) => {
// const [isOpen, toggleOpen] = useState(true);
// return
//
// };
// describe("Modal component", () => {
// test("Validating child element count and styles of modal wrapper", () => {
// render();
// const ModalContainer = screen.queryByTestId('root');
// const ModalContainerDiv = ModalContainer.querySelector('#modal-container-div');
// expect(ModalContainerDiv).toHaveClass('max-w-screen-md min-w-screen-md bg-modal-background text-app-foreground w-full relative z-9999 max-h-modal flex fc-modal-wrapper');
// expect(ModalContainerDiv.childElementCount).toBe(3);
// });
// test("Validating default classnames for modal children elements", () => {
// render();
// const ModalContainer = screen.queryByTestId('root');
// const ModalContainerDiv = ModalContainer.querySelector('#modal-container-div');
// const ModalContainerElements = ModalContainerDiv.children;
// //Header - dont have default class names
// //Body
// expect(ModalContainerElements[1]).toHaveClass('flex flex-col overflow-auto')
// //Footer
// expect(ModalContainerElements[2]).toHaveClass('flex')
// });
// test("should appears/disappers based on button click event", async () => {
// render();
// // when react-responsive-modal is visible
// const container = screen.queryByTestId('overlay');
// expect(container).toHaveStyle("animation: react-responsive-modal-overlay-in 300ms");
// // validate the button text for popup state
// let button = screen.queryByText('Close Modal');
// expect(button).toBeInTheDocument();
// // modal should not be visible after clicking close button
// const ClosePopupButton = screen.queryByTestId("close-button");
// click(ClosePopupButton);
// button = await waitFor(() => screen.queryByText('Open Modal'));
// expect(button).toBeInTheDocument();
// // visibility of react-responsive-modal is seen by update in style property
// expect(container).toHaveStyle("animation: react-responsive-modal-overlay-out 300ms");
// });
// });