fixed intentScheme test, cleaned up externalWithTypoe test
Change-Id: Ie3130c0b6fd2d468763e9a57cfed6a0d0ce3c907
diff --git a/espresso/intents-tests/src/androidTest/java/android/support/test/espresso/intent/IntentsIntegrationTest.java b/espresso/intents-tests/src/androidTest/java/android/support/test/espresso/intent/IntentsIntegrationTest.java
index 153660c..69fc6f6 100644
--- a/espresso/intents-tests/src/androidTest/java/android/support/test/espresso/intent/IntentsIntegrationTest.java
+++ b/espresso/intents-tests/src/androidTest/java/android/support/test/espresso/intent/IntentsIntegrationTest.java
@@ -157,7 +157,7 @@
// Testing Scheme "tel:xxx-xxx-xxxx"
onView(withId(R.id.send_data_to_call_edit_text))
- .perform(scrollTo(), typeText("123-345-6789"), closeSoftKeyboard());
+ .perform(closeSoftKeyboard(), scrollTo(), typeText("123-345-6789"), closeSoftKeyboard());
onView(withId(R.id.send_to_call_button)).perform(scrollTo(), click());
intended(allOf(
hasAction(Intent.ACTION_CALL),
@@ -254,15 +254,8 @@
@Test
@SuppressWarnings("unchecked")
public void externalIntentWithType() {
- String toPackage = "com.android.mms";
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
- // Starting with Android M the messaging package has changed.
- toPackage = "com.google.android.apps.messaging";
- }
onView(withId(R.id.send_message_button)).perform(scrollTo(), click());
- intended(allOf(hasAction(Intent.ACTION_SEND),
- toPackage(toPackage),
- hasType("text/plain")));
+ intended(allOf(hasAction(Intent.ACTION_SEND), hasType("text/plain")));
}
@Test