"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 DatasetAlert_1 = require("../DatasetAlert");
describe('DatasetAlert component', () => {
    it('all props are rendered', () => {
        (0, react_2.render)(react_1.default.createElement(DatasetAlert_1.DatasetAlert, { alert: "alert text", footer: "footer text", level: "warning" },
            react_1.default.createElement("span", { role: "marquee" }, "test text")));
        expect(react_2.screen.getByRole('marquee')).toBeVisible();
        expect(react_2.screen.getByText('alert text')).toBeVisible();
        expect(react_2.screen.getByText('footer text')).toBeVisible();
    });
    it('sets the correct alert class based on "level" prop', () => {
        (0, react_2.render)(react_1.default.createElement(DatasetAlert_1.DatasetAlert, { alert: "alert text", footer: "footer text", level: "warning" }, "Warning!"));
        expect(react_2.screen.getByRole('alert')).toHaveClass('warning');
    });
});
