Remove redundant Espresso/Travis settings

This commit is contained in:
Yusuke Matsubara 2017-04-20 17:48:04 +09:00
parent ba113ffc4a
commit 46b54e7312
3 changed files with 3 additions and 12 deletions

View file

@ -86,8 +86,7 @@ public class SettingsActivityTest {
// click "CC BY-4.0"
Espresso.onView(
// FIXME: just R.string.license_name_cc_by_four should be fine but fails on Travis
textAnyOf(R.string.license_name_cc_by_four, R.string.license_name_cc_by_4_0)
ViewMatchers.withText(R.string.license_name_cc_by_4_0)
).perform(ViewActions.click());
// click "License" (the first item)
@ -99,14 +98,10 @@ public class SettingsActivityTest {
// test the value remains "CC BY-4.0"
Espresso.onView(ViewMatchers.isChecked())
.check(ViewAssertions.matches(
textAnyOf(R.string.license_name_cc_by_four, R.string.license_name_cc_by_4_0)
ViewMatchers.withText(R.string.license_name_cc_by_4_0)
));
}
private Matcher<View> textAnyOf(int id1, int id2) {
return anyOf(ViewMatchers.withText(id1), ViewMatchers.withText(id2));
}
private static Matcher<View> findPreferenceList() {
return allOf(
ViewMatchers.isDescendantOfA(ViewMatchers.withId(android.R.id.content)),