gradio/js/app/test/sub_block_render.spec.ts
2024-06-10 21:33:28 +01:00

15 lines
473 B
TypeScript

import { test, expect } from "@gradio/tootils";
test("submit works", async ({ page }) => {
await page.getByTestId("textbox").first().focus();
await page.keyboard.press("Enter");
await expect(page.getByLabel("Prompt", { exact: true })).toHaveValue("image");
});
test("examples work", async ({ page }) => {
await page.getByText("A serious capybara at work, wearing a suit").click();
await expect(page.getByLabel("Prompt", { exact: true })).toHaveValue("image");
});