-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow multi-browser configuration #6975
feat: allow multi-browser configuration #6975
Conversation
✅ Deploy Preview for vitest-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
8e54cff
to
227094e
Compare
30ba4b6
to
3cc6dc5
Compare
@sheremet-va asked for naming help. After going back and forth in Discord, I farmed the work out to some of our future Robot overlords. I think the overlords did an okay job.
🤖 Browser Configuration Naming AnalysisQuick Reference: All Options// Current
test: {
browser: {
provider: 'playwright',
configs: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 1: browsers
test: {
browser: {
provider: 'playwright',
browsers: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 2: capabilities (conflicts with WebDriverIO)
test: {
browser: {
provider: 'playwright',
capabilities: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 3: environments
test: {
browser: {
provider: 'playwright',
environments: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 4: targets
test: {
browser: {
provider: 'playwright',
targets: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 5: profiles
test: {
browser: {
provider: 'playwright',
profiles: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
}
// Option 6: instances (recommended)
test: {
browser: {
provider: 'playwright',
instances: [{ browser: 'chromium' }, { browser: 'firefox' }]
}
} ContextVitest needs to name the configuration array for multiple browser setups in Requirements
Options Analysis
Recommendation:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I think I understood the idea and it makes sense to me 👍
I didn't check docs and there are some TODOs, but I guess those can be checked later.
Feel free to proceed if you want.
Description
Closes #5963
Closes #7017
The general idea is to inject new projects if
instances
are defined that inherit the same config and vite serverWith this PR,
browser.name
andbrowser.providerOptions
are deprecated. Useinstances
instead:The main performance optimization here instead of using different projects is that we can reuse the same server and keep the cache.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.