Skip to content

Commit

Permalink
update firefox preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Sep 24, 2024
1 parent 6d9a1eb commit fc89ad6
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion packages/tailwindcss/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,31 @@ export default defineConfig({
},
{
name: 'firefox',
use: { ...devices['Desktop 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 our `hover` variant implementation which uses an
// '(hover: hover)' media query to determine if hover is available.
//
// 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,
},
},
},
},

/* Test against mobile viewports. */
Expand Down

0 comments on commit fc89ad6

Please sign in to comment.