From eb300b60f3dd723aa9df4041fb2d7b1ec3446e9a Mon Sep 17 00:00:00 2001 From: "Andrew Y. Chen" Date: Tue, 4 Apr 2017 14:58:47 -0700 Subject: [PATCH] Revert D4770368: [rn] Use tag ids for testID Differential Revision: D4770368 fbshipit-source-id: 4bf8131a2a2974c8db072f62e8fb26686faa100d --- .../src/androidTest/java/com/facebook/react/testing/BUCK | 5 ++--- .../java/com/facebook/react/testing/ReactTestHelper.java | 7 ++----- .../src/main/java/com/facebook/react/uimanager/BUCK | 1 - .../com/facebook/react/uimanager/BaseViewManager.java | 4 ---- ReactAndroid/src/main/res/BUCK | 9 --------- ReactAndroid/src/main/res/views/uimanager/values/ids.xml | 5 ----- 6 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 ReactAndroid/src/main/res/views/uimanager/values/ids.xml diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK index 57276c344..bb7c09790 100644 --- a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK @@ -21,8 +21,6 @@ android_library( react_native_dep("third-party/java/junit:junit"), react_native_dep("third-party/java/mockito:mockito"), react_native_dep("third-party/java/testing-support-lib:runner"), - react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"), - react_native_integration_tests_target("java/com/facebook/react/testing/network:network"), react_native_target("java/com/facebook/react:react"), react_native_target("java/com/facebook/react/bridge:bridge"), react_native_target("java/com/facebook/react/common:common"), @@ -34,6 +32,7 @@ android_library( react_native_target("java/com/facebook/react/modules/debug:interfaces"), react_native_target("java/com/facebook/react/shell:shell"), react_native_target("java/com/facebook/react/uimanager:uimanager"), - react_native_target("res:uimanager"), + react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"), + react_native_integration_tests_target("java/com/facebook/react/testing/network:network"), ], ) diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java index 6250d2414..8054dff33 100644 --- a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java @@ -17,7 +17,6 @@ import android.view.View; import android.view.ViewGroup; import com.facebook.react.NativeModuleRegistryBuilder; -import com.facebook.react.R; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManagerBuilder; import com.facebook.react.bridge.CatalystInstance; @@ -188,9 +187,7 @@ public class ReactTestHelper { } public static String getTestId(View view) { - return view.getTag(R.id.react_test_id) instanceof String - ? (String) view.getTag(R.id.react_test_id) - : null; + return view.getTag() instanceof String ? (String) view.getTag() : null; } private static View findChild(View root, Predicate predicate) { @@ -214,7 +211,7 @@ public class ReactTestHelper { return new Predicate() { @Override public boolean apply(View view) { - Object tag = getTestId(view); + Object tag = view.getTag(); return tag != null && tag.equals(tagValue); } }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index c75b10b0d..954f2528f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -26,6 +26,5 @@ android_library( react_native_target("java/com/facebook/react/modules/i18nmanager:i18nmanager"), react_native_target("java/com/facebook/react/touch:touch"), react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), - react_native_target("res:uimanager"), ], ) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 16c85690a..24192175d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -5,7 +5,6 @@ package com.facebook.react.uimanager; import android.graphics.Color; import android.os.Build; import android.view.View; -import com.facebook.react.R; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.annotations.ReactProp; @@ -86,9 +85,6 @@ public abstract class BaseViewManager - - - -