
Issue #4 — “The Dark Mode Screenshot Debacle”
Issue #4 — “The Dark Mode Screenshot Debacle”

🌼 Lady Daisy Bug: A QA & Test Automation Digest with Personality
Welcome to Lady Daisy Bug — your new favorite corner of the internet where quality assurance meets charm, code, and character. Whether you’re debugging tests in the moonlight or strategizing a flawless regression suite before your first coffee, this newsletter’s for you.
I’m your host, Lady Daisy Bug — part test whisperer, part bug wrangler, and full-time believer in thoughtful testing. Each issue will blend bite-sized insights, automation tips, and a little QA storytelling to brighten your day (and your pipelines).
Let’s squash some bugs — and do it in style.
🌟 Bug of the Week: The Dark Mode Screenshot Debacle
Story:
I had just wrapped up a new batch of visual regression tests using a shiny new baseline — pixel-perfect, pristine, and passing beautifully in CI.
Then Product messaged me:
“Uhh… these screenshots don’t look right. Why is the login page suddenly black?”
I checked. Sure enough — same screen, same layout, but in dark mode.
And the worst part? The tests still passed.
Symptoms:
- Visual diffs returned no change.
- The images compared in CI were black-themed, but locally, they were in light mode.
- The actual layout and elements were identical — only the theme differed.
Root Cause:
My CI emulator was running Android 13+ with system-wide dark mode enabled by default.
Meanwhile, my local baseline screenshots had been captured with light mode enabled.
Because the screenshots technically matched in structure (same padding, borders, elements), the threshold-based diffing didn’t flag them — unless I switched to pixel-perfect mode (which broke on every font smoothing difference).
How I figured it out:
- Compared raw screenshots from CI vs local using a visual diff tool.
- Noticed identical coordinates… but inverse colors.
- Added this line to log the system theme:
adb shell settings get secure ui_night_mode
Fix:
- Explicitly set the system UI mode before tests:
adb shell cmd uimode night no # force light mode
- Added a visual check for theme consistency before running visual assertions.
- Updated the test environment doc so others don’t fall into the darkness.
📌 Lesson: Pixel diffs are powerful — but without consistent theming, you’re comparing shadows to sunlight.
🧪 Test Garden Tip: Control the Theme Before You Snap
When doing screenshot testing on Android:
✅ Always set the system night mode to a known state:
adb shell cmd uimode night no # Light mode
adb shell cmd uimode night yes # Dark mode
✅ Don’t trust system defaults — they vary by OS version, device, and even emulator image.
✅ If testing both themes, name your screenshots explicitly:
login_light.png
login_dark.png
Bonus: You can toggle dark mode from Appium too — just run a mobile shell script or intent broadcast as part of your test setup.
💬 Lady’s Log
“Test what you see, but don’t forget what’s hiding in the shadows.”
Visual testing is tricky. Sometimes it’s color shifts, sometimes it’s subtle anti-aliasing, sometimes it’s dark mode reminding you that your baselines were built on assumptions.
Light mode. Dark mode. QA mode. Always double check the environment.
- 𝓛𝓪𝓭𝔂 𝓓𝓪𝓲𝓼𝔂 𝓑𝓾𝓰 🐞🌼
📚 Petal Picks
- 🌘 “How to Test Dark Mode Effectively” — Browserstack
- 🎨 “How to design for dark mode: a practical guide” — Emily Stevens
- 🖼️ Tool: Appium Image Comparison plugin for pixel diffs & more
💌 Next Issue Teaser:
“The Mystery of the Missing Toast”
My automation swore the toast message was never shown.
The logs disagreed.
The screen recorder held the truth.