From 34828b1942d9442a05463ddee0c61118af70341c Mon Sep 17 00:00:00 2001 From: vadimt Date: Tue, 23 Jul 2019 13:54:05 -0700 Subject: [PATCH] Improving "Add automatically" recognition Bug: 138152531 Change-Id: I204233f06a80d2d17b24dd9622c7a2152b1303a0 --- .../com/android/launcher3/tapl/AddToHomeScreenPrompt.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java index 6813400b87..03d1600783 100644 --- a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java +++ b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java @@ -16,6 +16,8 @@ package com.android.launcher3.tapl; +import static java.util.regex.Pattern.CASE_INSENSITIVE; + import androidx.test.uiautomator.By; import androidx.test.uiautomator.UiObject2; @@ -23,7 +25,7 @@ import java.util.regex.Pattern; public class AddToHomeScreenPrompt { private static final Pattern ADD_AUTOMATICALLY = - Pattern.compile("ADD AUTOMATICALLY|Add automatically"); + Pattern.compile("^Add automatically$", CASE_INSENSITIVE); private final LauncherInstrumentation mLauncher; private final UiObject2 mWidgetCell;