Command
test
Description
The Vitest UI has an option to toggle Light/Dark mode on or off. But when using @vitest/browser-playwright then the users preference is always set to light, and does not respect OS preference. The big drawback here is that even if the UI button is toggled, it's reset the next time tests are started since it's not preserved. There's a way to configure this, but it requires a vitest.config.js: vitest-dev/vitest#8947 (comment)
Describe the solution you'd like
It would be great if Angular CLI could either allow configuring this default value or set it so it uses OS preference, when using the "test.options.browser" field.
- Angular CLI configures
contextOptions.colorScheme to be null and thus prefers-color-scheme to be OS default
- An
angular.json option to configure a new uiTheme to select light/dark/auto values
Describe alternatives you've considered
Using a custom vitest.config.js configuration to manually set playwright() plugin options. But it feels a bit overkill for this A11y feature.
Command
test
Description
The Vitest UI has an option to toggle Light/Dark mode on or off. But when using
@vitest/browser-playwrightthen the users preference is always set tolight, and does not respect OS preference. The big drawback here is that even if the UI button is toggled, it's reset the next time tests are started since it's not preserved. There's a way to configure this, but it requires avitest.config.js: vitest-dev/vitest#8947 (comment)Describe the solution you'd like
It would be great if Angular CLI could either allow configuring this default value or set it so it uses OS preference, when using the
"test.options.browser"field.contextOptions.colorSchemeto benulland thusprefers-color-schemeto be OS defaultangular.jsonoption to configure a newuiThemeto select light/dark/auto valuesDescribe alternatives you've considered
Using a custom
vitest.config.jsconfiguration to manually setplaywright()plugin options. But it feels a bit overkill for this A11y feature.