gradio/js/group/Group.test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
560 B
TypeScript
Raw Normal View History

import { test, describe, assert, afterEach, vi } from "vitest";
import { cleanup, render } from "@gradio/tootils";
import Group from "./static";
describe("Group", () => {
afterEach(() => {
cleanup();
});
test("setting visible to false hides the Group", async () => {
render(Group, {
elem_id: "group",
visible: false
});
const groupElement = document.getElementById("group");
assert(groupElement !== null, "Group element not found.");
assert(
groupElement.classList.contains("hide"),
"Group element is not hidden."
);
});
});