From f50a5d0dab4cab757bfe23ee5481151da153216e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 21 Oct 2026 22:14:01 -0700 Subject: [PATCH] test(e2e): enable async clipboard testing pref in Firefox (#39838) (#39927) Backport #39838 by @silverwind When `navigator.clipboard.readText()` runs before the page's copy has landed, Firefox shows its "Paste" prompt, which cannot be interacted with when headless. Avoid that and and use `dom.events.testing.asyncClipboard` which is a pref meant for testing that disabes this prompt. Fixes: https://github.com/go-gitea/gitea/actions/runs/39113819632/job/117635434106 Co-authored-by: silverwind --- playwright.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playwright.config.ts b/playwright.config.ts index 9dc8a7c1b5c..7b384b03258 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -34,6 +34,11 @@ export default defineConfig({ name: 'firefox', use: { ...devices['Desktop Firefox'], + launchOptions: { + firefoxUserPrefs: { + 'dom.events.testing.asyncClipboard': true, // disable paste prompt + }, + }, }, }, ],