"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var react_2 = require("@testing-library/react");
var PopupWithArrow_1 = require("./PopupWithArrow");
describe('Popup with arrow tests', function () {
    it('should render correct default state', function () {
        (0, react_2.render)(react_1.default.createElement(PopupWithArrow_1.PopupWithArrow, { open: true, anchorEl: document.body },
            react_1.default.createElement("div", { "data-reltio-id": "popupContent" })));
        expect(document.querySelectorAll('.backdrop')).toHaveLength(1);
        expect(document.querySelector('.arrow')).toBeInTheDocument();
        expect(react_2.screen.getByRole('tooltip')).toBeInTheDocument();
        expect(react_2.screen.getByTestId('popupContent')).toBeInTheDocument();
        expect(react_2.screen.getByRole('tooltip').firstChild).not.toHaveAttribute('style');
    });
    it('should add transition if transition prop is true', function () {
        (0, react_2.render)(react_1.default.createElement(PopupWithArrow_1.PopupWithArrow, { open: true, transition: true, anchorEl: document.body },
            react_1.default.createElement("div", { "data-reltio-id": "popupContent" })));
        expect(react_2.screen.getByRole('tooltip').firstChild).toHaveAttribute('style');
        expect(react_2.screen.getByTestId('popupContent')).toBeInTheDocument();
    });
});
