gradio/js/app/snapshots/blocks_xray.spec.ts

19 lines
456 B
TypeScript
Raw Normal View History

import { test, expect, Page } from "@playwright/test";
function mock_demo(page: Page, demo: string) {
return page.route("**/config", (route) => {
return route.fulfill({
headers: {
"Access-Control-Allow-Origin": "*"
},
path: `../../demo/${demo}/config.json`
});
});
}
test("blocks xray", async ({ page }) => {
await mock_demo(page, "blocks_xray");
await page.goto("http://localhost:9876");
await expect(page).toHaveScreenshot();
});