Skip to content

Commit 728446c

Browse files
committed
Update paragraph style selectors
1 parent 3ca2d85 commit 728446c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

app/src/androidTest/java/org/wordpress/aztec/demo/TestUtils.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package org.wordpress.aztec.demo;
22

3+
import android.support.test.espresso.DataInteraction;
34
import android.support.test.espresso.ViewInteraction;
45

6+
import static android.support.test.espresso.Espresso.onData;
57
import static android.support.test.espresso.Espresso.onView;
68
import static android.support.test.espresso.action.ViewActions.click;
79
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
810
import static android.support.test.espresso.matcher.ViewMatchers.withId;
9-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
1011
import static org.hamcrest.Matchers.allOf;
12+
import static org.hamcrest.Matchers.hasToString;
1113

1214
/**
1315
* Test utilities to be used with instrumentation tests.
@@ -37,13 +39,13 @@ public class TestUtils {
3739
public static ViewInteraction unorderedListButton = onView(withId(R.id.format_bar_button_ul));
3840

3941
// Heading/Paragraph Format Selectors
40-
public static ViewInteraction headingOneSelector = onView(allOf(withId(android.R.id.title), withText("Heading 1")));
41-
public static ViewInteraction headingTwoSelector = onView(withText("Heading 2"));
42-
public static ViewInteraction headingThreeSelector = onView(withText("Heading 3"));
43-
public static ViewInteraction headingFourSelector = onView(withText("Heading 4"));
44-
public static ViewInteraction headingFiveSelector = onView(withText("Heading 5"));
45-
public static ViewInteraction headingSixSelector = onView(withText("Heading 6"));
46-
public static ViewInteraction preSelector = onView(withText("Heading 6"));
42+
public static DataInteraction headingOneSelector = onData(hasToString("Heading 1"));
43+
public static DataInteraction headingTwoSelector = onData(hasToString("Heading 2"));
44+
public static DataInteraction headingThreeSelector = onData(hasToString("Heading 3"));
45+
public static DataInteraction headingFourSelector = onData(hasToString("Heading 4"));
46+
public static DataInteraction headingFiveSelector = onData(hasToString("Heading 5"));
47+
public static DataInteraction headingSixSelector = onData(hasToString("Heading 6"));
48+
public static DataInteraction preSelector = onData(hasToString("Preformat"));
4749

4850
// Link Modal
4951
public static ViewInteraction linkOKButton = onView(withId(android.R.id.button1));

0 commit comments

Comments
 (0)