gradio/js/group/Group.test.ts
pngwn 1419538ea7
Refactor component directories (#5074)
* asd

* changes

* fix everything

* cleanup

* add changeset

* fix casing

* lockfile

* fix casing

* fix ci, enable linting

* fix test

* add changeset

* add changeset

* delete changeset

* fix dirs

* fix casing

* fix notebooks

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-03 23:01:18 +01:00

26 lines
560 B
TypeScript

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."
);
});
});