gradio/js/spa/test/sub_block_render.spec.ts

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

16 lines
528 B
TypeScript
Raw Permalink Normal View History

import { test, expect } from "@self/tootils";
2024-06-11 04:33:28 +08:00
test("submit works", async ({ page }) => {
await page.getByTestId("textbox").first().focus();
await page.getByTestId("textbox").first().fill("test");
2024-06-11 04:33:28 +08:00
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");
});