mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
17 lines
542 B
TypeScript
17 lines
542 B
TypeScript
|
import { test, expect } from "@gradio/tootils";
|
||
|
|
||
|
test("Chatbot can support agentic demos by displaying messages with metadata", async ({
|
||
|
page
|
||
|
}) => {
|
||
|
await page.getByRole("button", { name: "Get San Francisco Weather" }).click();
|
||
|
await expect(
|
||
|
await page.locator("button").filter({ hasText: "💥 Error" }).nth(1)
|
||
|
).toBeVisible();
|
||
|
await expect(
|
||
|
page.locator("span").filter({ hasText: "🛠️ Used tool" })
|
||
|
).toBeVisible();
|
||
|
await expect(
|
||
|
page.locator("button").filter({ hasText: "It's a sunny day in San" })
|
||
|
).toBeVisible();
|
||
|
});
|