import React from "react";
import { render, screen } from "@testing-library/react";
import { AccordionTab } from "../AccordionTab";
describe("AccordionTab component", () => {
    it("is open by default with startOpen prop", async () => {
        render(React.createElement(AccordionTab, { id: "test", className: "", label: "test", startOpen: true, accordionStyle: "plain" }, "Child Element Text"));
        expect(await screen.getByText(/Child Element Text/)).toBeVisible();
    });
    it('displays an icon when accordionStyle = "fileTree"', async () => {
        render(React.createElement(AccordionTab, { id: "test", className: "", label: "test", startOpen: true, accordionStyle: "file-tree" }, "Child Element Text"));
        expect(await screen.getByText(/Child Element Text/)).toBeInTheDocument();
        expect(await screen.getByRole("img")).toBeInTheDocument();
    });
});
