Search in sources :

Example 36 with LargeTest

use of androidx.test.filters.LargeTest in project fdroidclient by f-droid.

the class MainActivityEspressoTest method showSettings.

@LargeTest
@Test
public void showSettings() {
    ViewInteraction settingsBottonNavButton = onView(allOf(withText(R.string.menu_settings), isDisplayed()));
    settingsBottonNavButton.perform(click());
    onView(withText(R.string.preference_manage_installed_apps)).check(matches(isDisplayed()));
    if (BuildConfig.FLAVOR.startsWith("basic") && BuildConfig.APPLICATION_ID.endsWith(".debug")) {
        // TODO fix me by sorting out the flavor applicationId for debug builds in app/build.gradle
        Log.i(TAG, "Skipping the remainder of showSettings test because it just crashes on basic .debug builds");
        return;
    }
    ViewInteraction manageInstalledAppsButton = onView(allOf(withText(R.string.preference_manage_installed_apps), isDisplayed()));
    manageInstalledAppsButton.perform(click());
    onView(withText(R.string.installed_apps__activity_title)).check(matches(isDisplayed()));
    onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
    onView(withText(R.string.menu_manage)).perform(click());
    onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
    manageInstalledAppsButton.perform(click());
    onView(withText(R.string.installed_apps__activity_title)).check(matches(isDisplayed()));
    onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
    onView(withText(R.string.menu_manage)).perform(click());
    onView(withContentDescription(R.string.abc_action_bar_up_description)).perform(click());
    onView(withText(R.string.about_title)).perform(click());
    onView(withId(R.id.version)).check(matches(isDisplayed()));
    onView(withId(R.id.ok_button)).perform(click());
    onView(withId(android.R.id.list_container)).perform(swipeUp()).perform(swipeUp()).perform(swipeUp());
}
Also used : ViewInteraction(androidx.test.espresso.ViewInteraction) LargeTest(androidx.test.filters.LargeTest) Test(org.junit.Test) LargeTest(androidx.test.filters.LargeTest)

Aggregations

LargeTest (androidx.test.filters.LargeTest)36 Test (org.junit.Test)36 MediumTest (androidx.test.filters.MediumTest)29 SmallTest (androidx.test.filters.SmallTest)29 SessionPlayer (androidx.media2.common.SessionPlayer)24 CountDownLatch (java.util.concurrent.CountDownLatch)23 MediaItem (androidx.media2.common.MediaItem)13 UriMediaItem (androidx.media2.common.UriMediaItem)13 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)12 ArrayList (java.util.ArrayList)9 MediaMetadata (androidx.media2.common.MediaMetadata)7 ExoPlayer (com.google.android.exoplayer2.ExoPlayer)7 AudioAttributesCompat (androidx.media.AudioAttributesCompat)3 PlayerResult (androidx.media2.common.SessionPlayer.PlayerResult)3 ViewInteraction (androidx.test.espresso.ViewInteraction)3 TestUtils.assertPlayerResult (com.google.android.exoplayer2.ext.media2.TestUtils.assertPlayerResult)3 Activity (android.app.Activity)2 Intent (android.content.Intent)2 Bundle (android.os.Bundle)2 CancellationSignal (android.os.CancellationSignal)2