mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Remove redundant Espresso/Travis settings
This commit is contained in:
parent
ba113ffc4a
commit
46b54e7312
3 changed files with 3 additions and 12 deletions
|
|
@ -14,8 +14,6 @@ android:
|
||||||
- build-tools-25.0.1
|
- build-tools-25.0.1
|
||||||
- extra-google-m2repository
|
- extra-google-m2repository
|
||||||
- extra-android-m2repository
|
- extra-android-m2repository
|
||||||
- extra-google-google_play_services
|
|
||||||
- extra-android-support
|
|
||||||
- ${ANDROID_TARGET}
|
- ${ANDROID_TARGET}
|
||||||
- android-25
|
- android-25
|
||||||
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
|
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
|
||||||
|
|
@ -23,7 +21,6 @@ before_script:
|
||||||
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
||||||
- emulator -avd test -no-audio -no-window &
|
- emulator -avd test -no-audio -no-window &
|
||||||
- android-wait-for-emulator
|
- android-wait-for-emulator
|
||||||
- adb shell input keyevent 82 &
|
|
||||||
script:
|
script:
|
||||||
- ./gradlew test connectedAndroidTest -stacktrace
|
- ./gradlew test connectedAndroidTest -stacktrace
|
||||||
after_failure:
|
after_failure:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ dependencies {
|
||||||
compile "com.android.support:support-v4:${project.supportLibVersion}"
|
compile "com.android.support:support-v4:${project.supportLibVersion}"
|
||||||
compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
|
compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
|
||||||
compile "com.android.support:design:${project.supportLibVersion}"
|
compile "com.android.support:design:${project.supportLibVersion}"
|
||||||
compile "com.android.support:support-annotations:${project.supportLibVersion}"
|
|
||||||
compile 'com.google.code.gson:gson:2.7'
|
compile 'com.google.code.gson:gson:2.7'
|
||||||
compile "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
|
compile "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
|
||||||
annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
|
annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,7 @@ public class SettingsActivityTest {
|
||||||
|
|
||||||
// click "CC BY-4.0"
|
// click "CC BY-4.0"
|
||||||
Espresso.onView(
|
Espresso.onView(
|
||||||
// FIXME: just R.string.license_name_cc_by_four should be fine but fails on Travis
|
ViewMatchers.withText(R.string.license_name_cc_by_4_0)
|
||||||
textAnyOf(R.string.license_name_cc_by_four, R.string.license_name_cc_by_4_0)
|
|
||||||
).perform(ViewActions.click());
|
).perform(ViewActions.click());
|
||||||
|
|
||||||
// click "License" (the first item)
|
// click "License" (the first item)
|
||||||
|
|
@ -99,14 +98,10 @@ public class SettingsActivityTest {
|
||||||
// test the value remains "CC BY-4.0"
|
// test the value remains "CC BY-4.0"
|
||||||
Espresso.onView(ViewMatchers.isChecked())
|
Espresso.onView(ViewMatchers.isChecked())
|
||||||
.check(ViewAssertions.matches(
|
.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() {
|
private static Matcher<View> findPreferenceList() {
|
||||||
return allOf(
|
return allOf(
|
||||||
ViewMatchers.isDescendantOfA(ViewMatchers.withId(android.R.id.content)),
|
ViewMatchers.isDescendantOfA(ViewMatchers.withId(android.R.id.content)),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue