gradio/js/spa/test/sub_block_render.spec.ts
Dawood Khan 1f3ee97d10
Fix Functional Tests (#9619)
* tests

* changes

* add changeset

* chet fixes

* fixes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: aliabid94 <aabid94@gmail.com>
2024-10-09 14:12:39 -07:00

16 lines
528 B
TypeScript

import { test, expect } from "@self/tootils";
test("submit works", async ({ page }) => {
await page.getByTestId("textbox").first().focus();
await page.getByTestId("textbox").first().fill("test");
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");
});