Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from facebook:master #502

Merged
merged 3 commits into from
Jan 6, 2021
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 6, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

jdeff and others added 3 commits January 5, 2021 23:22
Summary:
There has been a long-standing issue where black-box testing frameworks like Appium and Xamarin UITest have not been able to access the `testID` view prop for Android (see #7135). A natural place for this to be exposed is via a view's `resource-id`. The `resource-id` is what I have used when working on UIAutomator-based tests for native Android apps and is a non-localized, development-only identifier. As mentioned in the linked ticket, you can dynamically set the resource-id using the view's AccessibilityNodeInfo. This change simply checks to see if a testID is provided for a view and then exposes it through the view's accessibility node delegate.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Fixes #7135,  #9942, and #16137. Display the `testID` as the `resource-id` for black-box testing frameworks

Pull Request resolved: #29610

Test Plan:
I used the `uiautomatorviewer` tool to verify that the resource-id is populated with the `testID` of a few different views of the RNTester app.
<img width="912" alt="Screen Shot 2020-08-10 at 3 38 27 PM" src="https://user-images.githubusercontent.com/875498/89838534-55044100-db20-11ea-9be2-ba507a81f6fb.png">
<img width="1096" alt="Screen Shot 2020-08-10 at 3 40 41 PM" src="https://user-images.githubusercontent.com/875498/89838542-5897c800-db20-11ea-9895-462c6fea1130.png">

Reviewed By: JoshuaGross

Differential Revision: D25799550

Pulled By: fkgozali

fbshipit-source-id: e64ff1b90fb66b427fce7af533aa94792cfbcad3
Summary:
This diff refactors the createViewInstance method in order to ensure that viewID is set before props are updated in the view.
This is necessary because there are components that deliver events at the same time their props are set. This means that some components might not have their viewId set correctly when events are delivered.
Since viewId is used to determine if a view belongs to Fabric or Paper, there are cases when the events are not delivered to the right renderer

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25667987

fbshipit-source-id: 4acfa8f80d66e9e59514354481957d7d3b571248
Summary:
This diff refactors the intialization of Fabric in order to avoid loading UIManagerModule as part of the creation of FabricJSIModuleProvider.

One caveat is that now we are not taking into consideration the flag mLazyViewManagersEnabled
```
master/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java177

if (mLazyViewManagersEnabled) {
```
As a side effect of this diff view managers will be initialized twice if the user has fabric and paper enabled

This diff was originally backed out in D25739854 (4984c1e) because it produced a couple of bugs:
- https://fb.workplace.com/groups/rn.support/permalink/4917641074951135/
- https://fb.workplace.com/groups/rn.support/permalink/4918163014898941/

These bugs are fixed by D25667987 (2e63147).

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D25746024

fbshipit-source-id: 3d12d29973a12b1edfea75f4dd954790f835e9bd
@pull pull bot added the ⤵️ pull label Jan 6, 2021
@pull pull bot merged commit d3a3ce8 into MLH-Fellowship:master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants