Merge "Add more log for debugging resource id issue." into sc-dev am: e37d12e5c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14456004 Change-Id: Iecc7774fa844c3ea14a570476f007ca5901018c2
This commit is contained in:
@@ -27,6 +27,8 @@ android_test {
|
|||||||
],
|
],
|
||||||
|
|
||||||
test_suites: ["device-tests"],
|
test_suites: ["device-tests"],
|
||||||
|
optimize: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
instrumentation_for: "Settings",
|
instrumentation_for: "Settings",
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertThat;
|
|||||||
import android.app.Instrumentation;
|
import android.app.Instrumentation;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -63,6 +64,14 @@ public class AppNotificationComponentTest {
|
|||||||
activity -> {
|
activity -> {
|
||||||
View rv = activity.findViewById(R.id.recycler_view);
|
View rv = activity.findViewById(R.id.recycler_view);
|
||||||
|
|
||||||
|
if (rv == null) {
|
||||||
|
Log.d("UI_UTILS",
|
||||||
|
"Target not found: R.id.recycler_view #" + Integer.toHexString(
|
||||||
|
R.id.recycler_view));
|
||||||
|
UiUtils.dumpView(UiUtils.getFirstViewFromActivity(activity));
|
||||||
|
assertThat(Boolean.TRUE).isFalse();
|
||||||
|
}
|
||||||
|
|
||||||
UiUtils.waitUntilCondition(5000,
|
UiUtils.waitUntilCondition(5000,
|
||||||
() -> rv.findViewById(R.id.main_switch_bar) != null);
|
() -> rv.findViewById(R.id.main_switch_bar) != null);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user