gradio / js /app /test /load_space.spec.ts
mindmime's picture
Upload folder using huggingface_hub
a03b3ba verified
raw
history blame contribute delete
502 Bytes
import { test, expect } from "@gradio/tootils";
test("test that the submit and clear buttons in a loaded space work", async ({
page
}) => {
await page.getByLabel("x").click();
await page.getByLabel("Pakistan", { exact: true }).click();
await page.getByRole("button", { name: "Submit" }).click();
await expect(await page.getByLabel("Output")).toHaveValue("Pakistan");
await page.getByRole("button", { name: "Clear" }).click();
await expect(await page.getByLabel("Output")).toHaveValue("");
});