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

Commit 68c433d6 authored by Sara Kato's avatar Sara Kato
Browse files

Add test doubleTapAndDragToSelect_multiLine

Bug: 30687230
Change-Id: I260c641544f69768f0b8f6cf10d51724e7a7b3c3
parent a2c487ae
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -213,6 +213,16 @@ public class TextViewActivityTest extends ActivityInstrumentationTestCase2<TextV
        onView(withId(R.id.textview)).check(hasSelection("young beautiful"));
    }

    @SmallTest
    public void testDoubleTapAndDragToSelect_multiLine() throws Exception {
        final String helloWorld = "abcd\n" + "efg\n" + "hijklm\n" + "nop";
        onView(withId(R.id.textview)).perform(click());
        onView(withId(R.id.textview)).perform(replaceText(helloWorld));
        onView(withId(R.id.textview)).perform(
                doubleTapAndDragOnText(helloWorld.indexOf("m"), helloWorld.indexOf("a")));
        onView(withId(R.id.textview)).check(hasSelection("abcd\nefg\nhijklm"));
    }

    @SmallTest
    public void testSelectBackwordsByTouch() throws Exception {
        final String helloWorld = "Hello king of the Jungle!";