⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@V3RON
Copy link
Contributor

@V3RON V3RON commented Dec 2, 2025

Description

Implement UI testing capabilities for React Native Harness, providing screen queries and user interaction utilities for native mobile testing.

This feature adds the @react-native-harness/ui package with:

  • Screen queries: findByTestId, findAllByTestId, queryByTestId, queryAllByTestId, findByAccessibilityLabel, findAllByAccessibilityLabel, queryByAccessibilityLabel, queryAllByAccessibilityLabel
  • User interactions: userEvent.press(), userEvent.pressAt(), userEvent.type()
  • Screenshot capture: screen.screenshot() for visual regression testing
  • TypeScript support with comprehensive type definitions

Context

This branch introduces native UI testing functionality to complement React Native Harness's existing native module testing capabilities. Unlike traditional React Testing Library approaches that focus on component trees, this implementation provides direct access to native UI elements through testIDs and accessibility labels, enabling:

  • Real device testing: Query actual rendered UI elements on physical devices/emulators
  • Native behavior validation: Test native module interactions and UI state changes
  • Visual regression testing: Capture and compare screenshots of UI components
  • Cross-platform compatibility: Unified API for both iOS and Android testing

The implementation includes:

  • Native modules for iOS (HarnessUI.mm) and Android (HarnessUIModule.kt)
  • TypeScript API layer with async/sync query methods

This feature bridges the gap between Jest's JavaScript-only testing and full native mobile testing, providing developers with familiar testing patterns while maintaining access to native platform capabilities.

@vercel
Copy link

vercel bot commented Dec 2, 2025

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 15, 2026 7:52pm

Review with Vercel Agent

@V3RON V3RON changed the title feat: add support for UI queries and actions feat: UI testing API with queries and actions Jan 15, 2026
@V3RON V3RON marked this pull request as ready for review January 15, 2026 14:30
@V3RON V3RON merged commit b5f855a into main Jan 16, 2026
5 checks passed
@V3RON V3RON deleted the feat/ui-queries-and-actions branch January 16, 2026 07:57
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