fix(browser): make provider field required#886
Merged
Conversation
Deploying rstest with
|
| Latest commit: |
bed6f03
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://79161aa1.rstest.pages.dev |
| Branch Preview URL: | https://require-provider.rstest.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the provider field required in the browser configuration by removing its optional marker and adding runtime validation to ensure it's provided when browser mode is enabled.
Changes:
- Changed
providerfield from optional to required inBrowserModeConfigtype definition - Added runtime validation to throw an error when
browser.enabledis true butprovideris missing - Updated all configuration files (examples, e2e fixtures, templates) to explicitly include
provider: 'playwright'
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/config.ts | Removed optional marker from provider field and deleted default value comment |
| packages/core/src/config.ts | Added validation logic to enforce provider requirement when browser mode is enabled |
| packages/core/tests/config.test.ts | Added comprehensive test suite for browser provider validation |
| packages/core/tests/cli/init.test.ts | Updated existing tests to include required provider field |
| packages/core/src/cli/init.ts | Set default provider when browser options are provided via CLI |
| packages/core/src/cli/init/browser/templates.ts | Updated config template to include provider field |
| examples/browser-react/rstest.config.ts | Added explicit provider: 'playwright' |
| examples/browser-projects/projectA/rstest.config.ts | Added explicit provider: 'playwright' |
| examples/browser-projects/projectB/rstest.config.ts | Added explicit provider: 'playwright' |
| e2e/browser-mode/fixtures/*/rstest.config.ts | Added explicit provider: 'playwright' to all browser mode fixtures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
07df3ab to
bed6f03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make
providerfield required.Related Links
Checklist