mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Merge pull request #528 from whym/espresso
Remove redundant Espresso/Travis settings
This commit is contained in:
commit
3c43578871
3 changed files with 3 additions and 12 deletions
|
|
@ -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)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue