2024-08-23 00:38:45 +08:00
|
|
|
import { test, expect } from "@self/tootils";
|
2022-05-27 16:53:50 +08:00
|
|
|
|
|
|
|
test("renders the correct elements", async ({ page }) => {
|
2022-10-13 00:30:42 +08:00
|
|
|
const textbox = await page.getByLabel("Name");
|
2022-05-27 16:53:50 +08:00
|
|
|
|
|
|
|
await textbox.fill("Frank");
|
2022-10-13 00:30:42 +08:00
|
|
|
await expect(await textbox).toHaveValue("Frank");
|
|
|
|
await expect(await page.getByLabel("Output")).toHaveValue(
|
2022-05-27 16:53:50 +08:00
|
|
|
"Welcome! This page has loaded for Frank"
|
|
|
|
);
|
|
|
|
});
|
2023-08-24 18:12:27 +08:00
|
|
|
|
|
|
|
test("renders the footer text", async ({ page }) => {
|
|
|
|
const footer = page.locator("footer");
|
|
|
|
|
|
|
|
await expect(footer).toBeVisible();
|
|
|
|
await expect(
|
|
|
|
footer.getByText("Use via API · Built with Gradio ")
|
|
|
|
).toBeVisible();
|
|
|
|
});
|