react-native/Examples/UIExplorer/UIExplorerUnitTests
alvaromb e52cab5a7f Adds the ability to use UIManager to check if a node is an ancestor
Summary:
Sometimes is handy to check if a React node is a descendant of another node or not. For instance, I want to check if the focused `TextInput` is descendant of an specific `ScrollView`:

```js
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
UIManager.viewIsAncestorOf(
  currentlyFocusedField,
  this.getInnerViewNode(),
  (isAncestor) => {
    if (isAncestor) {
      console.log('The focused field is a descendant of this ScrollView!')
    }
  }
)
```

This function uses the same strategy as the `measureLayout` method to check if one node is an ancestor of other node. As the `measureLayout` method, this is performed outside the main thread.

By now I've only implemented the iOS version and its tests, but if this function is going to be merged I'll implement the Android version too. I have objc experience but no Java or Android, so I prefer to validate this functionality before jumping into developing the Android part.
Closes https://github.com/facebook/react-native/pull/7876

Differential Revision: D3662045

Pulled By: javache

fbshipit-source-id: b9668e8ea94fd01db76651f16243926cf9c2566f
2016-08-03 04:13:43 -07:00
..
OCMock CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
Info.plist Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
LayoutSubviewsOrderingTest.m Bugfix - Typos 2015-12-15 09:09:32 -08:00
RCTAllocationTests.m Re-enable testUnderlyingBridgeIsDeallocated 2016-01-06 09:03:33 -08:00
RCTBridgeTests.m Remove code for testing without JS bundle 2016-07-11 13:33:55 -07:00
RCTBundleURLProviderTests.m Removed calls to RCTBundleURLProvider setDefaults 2016-07-11 02:58:32 -07:00
RCTComponentPropsTests.m Remove code for testing without JS bundle 2016-07-11 13:33:55 -07:00
RCTConvert_NSURLTests.m Use mainBundle in RCTConvert to resolve asset paths 2015-11-05 09:30:36 -08:00
RCTConvert_UIFontTests.m Implemented lazy parsing of method signatures to improve TTI 2015-08-11 08:49:13 -08:00
RCTEventDispatcherTests.m Use new enqueueJSCall method everywhere 2016-08-02 11:14:06 -07:00
RCTGzipTests.m Re-enable testUnderlyingBridgeIsDeallocated 2016-01-06 09:03:33 -08:00
RCTImageLoaderHelpers.h Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageLoaderHelpers.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageLoaderTests.m Remove code for testing without JS bundle 2016-07-11 13:33:55 -07:00
RCTImageUtilTests.m Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTJSCExecutorTests.m Move RCTJSCExecutorTests to ReactKitBenchmarks 2016-04-19 11:37:28 -07:00
RCTJSONTests.m Handle bad JSON data without crashing 2016-01-26 06:13:29 -08:00
RCTMethodArgumentTests.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTModuleInitNotificationRaceTests.m Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
RCTModuleInitTests.m Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
RCTModuleMethodTests.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTShadowViewTests.m Adds the ability to use UIManager to check if a node is an ancestor 2016-08-03 04:13:43 -07:00
RCTUIManagerTests.m Fixed unit tests 2016-06-07 12:43:49 -07:00
RCTURLUtilsTests.m Remove `hot` query string attribut when HL is disabled 2016-01-06 11:55:33 -08:00
TestBundle.js Cleanup UIExplorer folder 2016-07-12 05:59:13 -07:00
libOCMock.a [ReactNative] Move unit tests to UIExplorer 2015-06-06 13:38:34 -08:00