test(e2e): enable async clipboard testing pref in Firefox by silverwind · Pull Request #39838 · go-gitea/gitea · GitHub
Skip to content

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

Open
silverwind wants to merge 3 commits into
go-gitea:mainfrom
silverwind:e2e-firefox-clipboard
Open

silverwind wants to merge 3 commits into
go-gitea:mainfrom
silverwind:e2e-firefox-clipboard

Conversation

@silverwind

@silverwind silverwind commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

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

Playwright can't grant clipboard-read in Firefox, so a clipboard read that
runs before the page's copy lands never settles and expect.poll times out.

Assisted-by: Claude Code:claude-opus-5-5
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 18, 2026
@silverwind silverwind changed the title test(e2e): enable async clipboard testing pref in Firefox test: enable async clipboard testing pref in Firefox Oct 18, 2026
@silverwind silverwind changed the title test: enable async clipboard testing pref in Firefox test(e2e): enable async clipboard testing pref in Firefox Oct 18, 2026
@silverwind silverwind added the backport/v28 This PR should be backported to Gitea 28 label Oct 18, 2026
@silverwind

Copy link
Copy Markdown
Member Author

Comment thread playwright.config.ts Outdated
Signed-off-by: silverwind <me@silverwind.io>
@silverwind
silverwind requested review from bircni and lunny October 21, 2026 05:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v28 This PR should be backported to Gitea 28 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants