Skip to content

Conversation

@fi3ework
Copy link
Member

@fi3ework fi3ework commented Jan 7, 2026

Summary

  • Add rstest init browser command with interactive and --yes modes
  • Auto-detect project info: React, TypeScript, package manager, test directory
  • Generate rstest.browser.config.ts, example component and test files
  • Update package.json with test:browser script and devDependencies
  • Add e2e test for init browser command

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit ddf5978
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/695f51a99c42ea000838b10b
😎 Deploy Preview https://deploy-preview-841--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fi3ework fi3ework force-pushed the init-browser branch 4 times, most recently from 3732d08 to c3f3066 Compare January 8, 2026 05:52
@fi3ework fi3ework marked this pull request as ready for review January 8, 2026 05:57
Copilot AI review requested due to automatic review settings January 8, 2026 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an rstest init browser command to scaffold browser testing configuration and example files. The command supports both interactive and non-interactive modes (with --yes flag), auto-detects project settings like framework (React), language (TypeScript/JavaScript), and package manager, then generates appropriate configuration, component, and test files.

Key changes:

  • Add interactive CLI initialization with project auto-detection
  • Generate browser test configuration and example files
  • Automatically update package.json with test scripts and dependencies

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Add new dependencies for CLI prompts and package manager detection
packages/core/src/core/browserLoader.ts Remove duplicate RSTEST_VERSION declaration (now in env.d.ts)
packages/core/src/cli/init/browser/utils.ts Add utility functions for file operations and package.json updates
packages/core/src/cli/init/browser/templates.ts Add template generators for config, components, and tests
packages/core/src/cli/init/browser/index.ts Export create function for browser initialization
packages/core/src/cli/init/browser/detect.ts Add project detection logic for framework, language, and package manager
packages/core/src/cli/init/browser/create.ts Implement main initialization logic with interactive and non-interactive modes
packages/core/src/cli/commands.ts Register 'init' command with browser subcommand
packages/core/package.json Add new dependencies for CLI functionality
packages/core/LICENSE.md Add license notices for new dependencies
package.json Add Playwright to root dev dependencies
e2e/cli/initBrowser.test.ts Add e2e test for init browser command
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fi3ework fi3ework force-pushed the init-browser branch 2 times, most recently from 22805ec to 68274ee Compare January 8, 2026 06:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fi3ework fi3ework merged commit 25c3376 into main Jan 8, 2026
15 checks passed
@fi3ework fi3ework deleted the init-browser branch January 8, 2026 07:08
@9aoy 9aoy mentioned this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant