gradio/js/app/test/blocks_kinematics.spec.ts
2023-05-12 16:22:25 +01:00

15 lines
434 B
TypeScript

import { test, expect, Page } from "@playwright/test";
import { mock_theme, wait_for_page, mock_api, mock_demo } from "./utils";
test("renders the correct elements", async ({ page }) => {
await mock_demo(page, "blocks_kinematics");
await mock_api(page, [[25, 45]]);
await mock_theme(page);
await wait_for_page(page);
await Promise.all([
page.click("button:has-text('Run')"),
page.waitForResponse("**/run/predict")
]);
});