Open
Description
Version
1.49.0
Steps to reproduce
- Clone repo: https://github.com/greyhillman/playwright-firefox-dark-bug
npm install
npm run test
Expected behavior
Test should pass. Firefox should still be in dark mode when taking the screenshot of the page.
Actual behavior
Test fails. Firefox is in light mode when taking the screenshot of the page.
Additional context
- When testing in Chrome and Mobile Chrome, the page is in dark mode when taking the screenshot.
- Comments in the test files should also help.
There is a workaround in workaround.spec.ts
, which is to simply navigate to the page and then emulateMedia
.
Environment
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 7 2700 Eight-Core Processor
Memory: 9.77 GB / 15.54 GB
Container: Yes
Binaries:
Node: 18.19.1 - /usr/bin/node
npm: 9.2.0 - /usr/bin/npm
Languages:
Bash: 5.2.21 - /usr/bin/bash
npmPackages:
@playwright/test: ^1.49.0 => 1.49.0