diff --git a/packages/react-native/Libraries/Components/View/__tests__/View-hiddenSubtrees-itest.js b/packages/react-native/Libraries/Components/View/__tests__/View-hiddenSubtrees-itest.js new file mode 100644 index 000000000000..858a32e038ad --- /dev/null +++ b/packages/react-native/Libraries/Components/View/__tests__/View-hiddenSubtrees-itest.js @@ -0,0 +1,208 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment'; + +import * as Fantom from '@react-native/fantom'; +import * as React from 'react'; +import {Text, View} from 'react-native'; + +type ScreenState = { + rows: number, + label: string, + nestedHidden: boolean, + absolute: boolean, +}; + +function Screen({ + hidden, + state, +}: { + hidden: boolean, + state: ScreenState, +}): React.Node { + const rows = []; + for (let i = 0; i < state.rows; i++) { + rows.push( + + + + + + {state.label} {i} + + + + , + ); + } + return ( +