Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enabled pointer capabilities for Firefox in Playwright #1589

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ const config: PlaywrightTestConfig = {
name: 'firefox',
use: {
...devices['Desktop Firefox'],
// https://playwright.dev/docs/test-use-options#more-browser-and-context-options
launchOptions: {
// https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-firefox-user-prefs
firefoxUserPrefs: {
// By default, headless Firefox runs as though no pointers capabilities
// are available.
// https://github.com/microsoft/playwright/issues/7769#issuecomment-966098074
//
// This impacts React Spectrum which uses an '(any-pointer: fine)'
// media query to determine font size. It also causes certain chart
// elements to always be visible that should only be visible on
// hover.
//
// Available values for pointer capabilities:
// NO_POINTER = 0x00;
// COARSE_POINTER = 0x01;
// FINE_POINTER = 0x02;
// HOVER_CAPABLE_POINTER = 0x04;
//
// Setting to 0x02 | 0x04 says the system supports a mouse
'ui.primaryPointerCapabilities': 0x02 | 0x04,
'ui.allPointerCapabilities': 0x02 | 0x04,
},
},
},
},

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading