test(e2e): enable async clipboard testing pref in Firefox (#39838)

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
Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind authored and GitHub committed 2026-10-22 03:16:54 +00:00
1 parent 7e164fe61a
commit c1c6bdfedd
1 file changed
+5
+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
},
},
},
},
],