mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
4030f28af6
* helpers * add changeset * changes * add changeset * changes * tweak * format * example to docs * add changeset * fixes * add tuple * add changeset * print * format * clean' * clean * format * format backend * fix backend tests * format * notebooks * comment * delete demo * add changeset * docstring * docstring * changes * add changeset * components * changes * changes * format * add test * fix python test * use deep_equal --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
21 lines
811 B
TypeScript
21 lines
811 B
TypeScript
import { test, expect } from "@gradio/tootils";
|
|
|
|
test("examples_get_updated_correctly", async ({ page }) => {
|
|
await page.locator(".gallery-item").first().click();
|
|
let image = await page.getByTestId("image").locator("img").first();
|
|
await expect(await image.getAttribute("src")).toContain("cheetah1.jpg");
|
|
await page.getByRole("button", { name: "Update Examples" }).click();
|
|
|
|
let example_image;
|
|
await expect(async () => {
|
|
example_image = await page.locator(".gallery-item").locator("img").first();
|
|
await expect(await example_image.getAttribute("src")).toContain("logo.png");
|
|
}).toPass();
|
|
|
|
await example_image.click();
|
|
await expect(async () => {
|
|
image = await page.getByTestId("image").locator("img").first();
|
|
await expect(await image.getAttribute("src")).toContain("logo.png");
|
|
}).toPass();
|
|
});
|