import { html, fixture, expect } from "@open-wc/testing";
import IconPack from "@ollion/flow-system-icon/dist/types/icon-pack";
// import flow-core elements
import "@ollion/flow-core";
import { ConfigUtil } from "@ollion/flow-core";
import { FTrow, FTable } from "@ollion/flow-table";
ConfigUtil.setConfig({ iconPack: IconPack });
describe("f-trow", () => {
it("is defined", () => {
const el = document.createElement("f-trow");
expect(el).instanceOf(FTrow);
});
it("should open details", async () => {
const el = await fixture(
html`
Header
This is details slot
Column
})}
`
);
await el.updateComplete;
const row = el.querySelector("f-trow#row-to-test");
await row?.updateComplete;
const expandableElement = row?.shadowRoot?.querySelector(".expandable");
expect(expandableElement?.classList.contains("opened")).to.equal(true);
});
});