gradio/.config/playwright.config.js
Hannah ded5256c4a
Fix audio recording events not dispatching (#7158)
* fix audio events and add events test

* add changeset

* add changes to audio demo

* Fix e2e tests

* regenerate notebook

* formatting

* test timeout for e2e

* formatting

* remove value param from stop_recording

* formatting

* fix test

* formatting

* tweak

* test new playwright config

* skip test

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-26 18:13:27 +01:00

25 lines
638 B
JavaScript

import { defineConfig } from "@playwright/test";
export default 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: 60000 },
timeout: 90000,
testMatch: /.*.spec.ts/,
testDir: "..",
globalSetup: "./playwright-setup.js",
workers: process.env.CI ? 1 : undefined
});