You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/ui/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,8 @@ Queries for all elements by accessibility label without throwing. Returns an emp
101
101
Captures a screenshot of the entire app window, a specific element, or a custom region.
102
102
Returns a ScreenshotResult with PNG data, or null if capture fails.
103
103
104
+
> **Warning**: If you are capturing screenshots of elements that extend beyond the screen boundaries (e.g., large scroll views or absolutely positioned views that are partially off-screen), you must disable view flattening in your configuration by setting `disableViewFlattening: true` in your `rn-harness.config.mjs` file.
|`entryPoint`|**Required.** Path to your React Native app's entry point file.|
84
+
|`appRegistryComponentName`|**Required.** Name of the component registered with AppRegistry.|
85
+
|`runners`|**Required.** Array of test runners (at least one required).|
86
+
|`defaultRunner`| Default runner to use when none specified.|
87
+
|`bridgeTimeout`| Bridge timeout in milliseconds (default: `60000`).|
88
+
|`bundleStartTimeout`| Bundle start timeout in milliseconds (default: `15000`).|
89
+
|`maxAppRestarts`| Maximum number of app restarts when app fails to report ready (default: `2`). |
90
+
|`resetEnvironmentBetweenTestFiles`| Reset environment between test files (default: `true`). |
91
+
|`webSocketPort`| Web socket port for bridge communication (default: `3001`).|
92
+
|`detectNativeCrashes`| Detect native app crashes during test execution (default: `true`).|
93
+
|`crashDetectionInterval`| Interval in milliseconds to check for native crashes (default: `500`).|
94
+
|`disableViewFlattening`| Disable view flattening in React Native (default: `false`). |
95
+
|`coverage`| Coverage configuration object. |
96
+
|`coverage.root`| Root directory for coverage instrumentation (default: `process.cwd()`).|
97
+
|`forwardClientLogs`| Forward console logs from the app to the terminal (default: `false`). |
98
98
99
99
## Test Runners
100
100
@@ -276,5 +276,3 @@ Without specifying `coverageRoot`, babel-plugin-istanbul may skip instrumenting
276
276
:::tip When to use coverageRoot
277
277
Set `coverageRoot` when you notice 0% coverage in your reports or when source files are not being instrumented for coverage. This commonly occurs in create-react-native-library projects and other monorepo setups.
You can capture screenshots of specific elements instead of the entire screen:
152
152
153
+
:::warning
154
+
If you are capturing screenshots of elements that extend beyond the screen boundaries, you must disable view flattening in your configuration to ensure the entire element can be rendered.
155
+
156
+
This can be done by setting `disableViewFlattening: true` in your `rn-harness.config.mjs` file.
0 commit comments