gradio/.config/playwright.config.js
pngwn 5d1e8dae5a
batch UI updates on a per frame basis (#7564)
* changes

* process fe fn tests

* cleanup

* cleanup

* create_target_meta tests and abstraction

* add interactivity detection and tests

* more functions more tests

* add tests for component loader, fix errors

* fix everything

* add changeset

* add changeset

* ci

* cleanup

* cleanup

* test

* fix again

* tweaks

* cleanup

* add changeset

* fix loading_status

* cleanup

* ensure updates have been flushed before making API requests

* add changeset

* df fix

* fixes

* fix dataframe updates

* fix dataframe updates

* remove $open var

* add changeset

* fix tests

* extend timeout for lite

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-03-13 13:46:40 +00:00

49 lines
1.3 KiB
JavaScript

import { defineConfig } from "@playwright/test";
const base = defineConfig({
use: {
screenshot: "only-on-failure",
trace: "retain-on-failure",
permissions: ["clipboard-read", "clipboard-write", "microphone"],
bypassCSP: true,
launchOptions: {
args: [
"--disable-web-security",
"--use-fake-device-for-media-stream",
"--use-fake-ui-for-media-stream",
"--use-file-for-fake-audio-capture=../gradio/test_data/test_audio.wav"
]
}
},
expect: { timeout: 15000 },
timeout: 30000,
testMatch: /.*.spec.ts/,
testDir: "..",
workers: process.env.CI ? 1 : undefined
});
const normal = defineConfig(base, {
globalSetup: "./playwright-setup.js"
});
normal.projects = undefined; // Explicitly unset this field due to https://github.com/microsoft/playwright/issues/28795
const lite = defineConfig(base, {
webServer: {
command: "python -m http.server 8000 --directory ../js/lite",
url: "http://localhost:8000/",
reuseExistingServer: !process.env.CI
},
testMatch: [
"**/file_component_events.spec.ts",
"**/chatbot_multimodal.spec.ts",
// "**/kitchen_sink.spec.ts",
"**/gallery_component_events.spec.ts"
],
workers: 1
});
lite.projects = undefined; // Explicitly unset this field due to https://github.com/microsoft/playwright/issues/28795
export default !!process.env.GRADIO_E2E_TEST_LITE ? lite : normal;