vitest-dev / vitest-dev/vitest
Allow setting browser to dark theme in configuration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Clear and concise description of the problem
Every time I run browser tests, I manually click Toggle to dark mode when browser pops up.
It would be nice if I could set in configuration to always set it to dark theme for me.
Suggested solution
There could be configuration setting browser.theme that allows setting preferred theme.
Possible values could be 'light' or 'dark'.
Default value could remain 'light'.
test: {
browser: {
theme: 'dark'
},
},
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the browser-test configuration and the existing “Toggle to dark mode” control. Check how browser options are defined and validated, then run the relevant browser tests; done means a browser.theme setting accepts light or dark, defaults to light, and applies the selected theme.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100