pest icon indicating copy to clipboard operation
pest copied to clipboard

[Bug]: browser test case for dark mode does not apply the setting

Open biinari opened this issue 3 months ago • 0 comments

What Happened

This test case in pest-plugin-browser should apply dark mode and compare the screenshot.

How to Reproduce

Add a debug to this test case to see the output in a browser:

    // ...

    match ($scheme) {
        ColorScheme::DARK => $page->inDarkMode(),
        ColorScheme::LIGHT => $page->inLightMode(),
    };

    if ($scheme === ColorScheme::DARK) {
        $page->debug();
    }

This should show as white text on a black background for the dark colour scheme. Currently it shows as black text on a white background.

The fix would be to assign the result of the match back to $page.

Unfortunately, I don't have a MacOS system so I can't make a PR updating the saved screenshot.

Sample Repository

No response

Pest Version

4.1.0

PHP Version

8.3.26

Operation System

Linux

Notes

No response

biinari avatar Nov 06 '25 06:11 biinari