Skip to content

Commit

Permalink
Playwright fixes
Browse files Browse the repository at this point in the history
- Pinning to 1.37.1
- Firefox pointer fixes

deephaven#1543
  • Loading branch information
bmingles committed Oct 19, 2023
1 parent 8b19a33 commit 9a730c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@deephaven/tsconfig": "file:../tsconfig",
"@deephaven/utils": "file:../utils",
"@fortawesome/fontawesome-common-types": "^6.1.1",
"@playwright/test": "^1.37.1",
"@playwright/test": "1.37.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
17 changes: 17 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ 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: {
// These settings fix an issue with '(any-pointer: fine)' media queries
// used by React Spectrum. In headless Firefox, this query seems to
// always return false which causes Spectrum to use the "large" scale.
// Other browsers properly return true which triggers "medium" scale.
// https://github.com/microsoft/playwright/issues/7769#issuecomment-966098074
// const NO_POINTER = 0x00;
// const COARSE_POINTER = 0x01;
// const FINE_POINTER = 0x02;
// const HOVER_CAPABLE_POINTER = 0x04;
'ui.primaryPointerCapabilities': 0x02 | 0x04,
'ui.allPointerCapabilities': 0x02 | 0x04,
},
},
},
},

Expand Down

0 comments on commit 9a730c8

Please sign in to comment.