Skip to content

Conversation

@sonalidudhia
Copy link
Contributor

@sonalidudhia sonalidudhia commented Dec 26, 2025

Problem

inDarkMode() / inLightMode() return a new Page instance, but the result was not reassigned.
Because of this, the color scheme was never applied and the screenshot test was a false positive.

Fix

Reassign the returned Page instance so the color scheme is actually applied.
Additionally, validate the behavior by asserting scheme-specific content after switching between dark and light modes.

Verification

Verified visually using debug() on macOS
Updated snapshots now correctly differ for light and dark modes

Related

Fixes #1566

@nunomaduro nunomaduro merged commit e73ea0d into pestphp:4.x Dec 26, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants