Skip to content

Conversation

@V3RON
Copy link
Contributor

@V3RON V3RON commented Jan 22, 2026

Description

Added support for web platform with all functionalities supported by the native equivalents, including UI testing capabilities.

See #40 for the initial implementation.

Context

The primary goal was to introduce Web platform support to react-native-harness, allowing developers to run the same harness tests on web browsers as they do on mobile. This was achieved by integrating Playwright as the underlying automation engine for web runners.

Summary of changes

  • New Package: @react-native-harness/platform-web:
    • Implemented a web-specific platform runner.
    • Added helper factories for chromium, chrome, firefox, and webkit browser configurations.
  • Playground app updates:
    • Added index.html and updated index.js to support web entry points via react-native-web.
    • Configured Metro for web compatibility (metro.config.js).
    • Updated rn-harness.config.mjs with web and chromium runners.
  • Core logic enhancements:
    • Updated @react-native-harness/runtime and @react-native-harness/ui to handle web-specific constraints (e.g., disabling HMR on web, web-specific UI harness components).
  • GitHub Action integration:
    • Created a dedicated GitHub Action (./actions/web) to streamline E2E testing in CI environments.
  • Documentation:
    • Added a detailed README for the web platform package and updated the documentation website with configuration guides.

Testing

The changes were verified through both local and automated E2E testing:

  1. Local testing:
    • The apps/playground project was used as the primary test bed.
    • Runners were tested in both headful (Chrome) and headless (Chromium) modes by running jest --selectProjects react-native-harness locally within the playground app.
  2. E2E via GitHub Actions:
    • A new e2e-web job was added to the .github/workflows/e2e-tests.yml workflow.
    • This job automatically runs on ubuntu-22.04 for pull requests targeting main.
    • It executes the full harness test suite against a headless Chromium instance using the custom ./actions/web action.

@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-native-harness Ready Ready Preview, Comment Jan 22, 2026 0:40am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants