mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
669ee42c8f
* change ports in dev mode * changelog * correctly detect space embeds * changelog * formatting
19 lines
463 B
TypeScript
19 lines
463 B
TypeScript
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 layout", async ({ page }) => {
|
|
await mock_demo(page, "blocks_layout");
|
|
await page.goto("http://localhost:9876");
|
|
await expect(page).toHaveScreenshot();
|
|
});
|