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 <me@silverwind.io>
This commit is contained in:
Giteabot
2026-10-21 22:14:01 -07:00
committed by GitHub
co-authored by silverwind
parent bc3e228e78
commit f50a5d0dab
+5
View File
@@ -34,6 +34,11 @@ export default defineConfig({
name: 'firefox',
use: {
...devices['Desktop Firefox'],
launchOptions: {
firefoxUserPrefs: {
'dom.events.testing.asyncClipboard': true, // disable paste prompt
},
},
},
},
],