mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
ae4277a9a8
* move files * commit the rest of the files * fix lockfile * fix workflow * fix type errors * fix tests * only run ci when certain files change * run correct test command in ci * version * fix pypi script --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
19 lines
458 B
TypeScript
19 lines
458 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("kitchen sink", async ({ page }) => {
|
|
await mock_demo(page, "kitchen_sink");
|
|
await page.goto("http://localhost:9876");
|
|
await expect(page).toHaveScreenshot();
|
|
});
|