Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44515f42 authored by vadimt's avatar vadimt
Browse files

Allowing both normal-case and uppercase versions of widget prompt

The prompt is "Add automatically"

Bug: 138152531
Change-Id: I5f1a15563e1e11768579711108a28070b72b4454
parent 2f0fdd6a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -19,7 +19,11 @@ package com.android.launcher3.tapl;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.UiObject2;

import java.util.regex.Pattern;

public class AddToHomeScreenPrompt {
    private static final Pattern ADD_AUTOMATICALLY =
            Pattern.compile("ADD AUTOMATICALLY|Add automatically");
    private final LauncherInstrumentation mLauncher;
    private final UiObject2 mWidgetCell;

@@ -33,9 +37,6 @@ public class AddToHomeScreenPrompt {
    public void addAutomatically() {
        mLauncher.waitForObjectInContainer(
                mWidgetCell.getParent().getParent().getParent().getParent(),
                By.text(LauncherInstrumentation.isAvd()
                        ? "ADD AUTOMATICALLY"
                        : "Add automatically")).
                click();
                By.text(ADD_AUTOMATICALLY)).click();
    }
}