gradio/js/app/snapshots/kitchen_sink.spec.ts
pngwn ae4277a9a8
move files (#3605)
* 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>
2023-03-27 16:12:58 -07:00

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();
});