android.support.test.filters.LargeTest Java Examples

The following examples show how to use android.support.test.filters.LargeTest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 6 votes vote down vote up
@LargeTest
public void showCategories() {
    if (!BuildConfig.FLAVOR.startsWith("full")) {
        return;
    }
    onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
    onView(allOf(withText(R.string.main_menu__categories), isDisplayed())).perform(click());
    onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed()))
            .perform(swipeDown())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeDown())
            .perform(swipeDown())
            .perform(swipeRight())
            .perform(swipeLeft())
            .perform(swipeLeft())
            .perform(swipeLeft())
            .perform(swipeLeft())
            .perform(click());
}
 
Example #2
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 6 votes vote down vote up
@LargeTest
public void showLatest() {
    if (!BuildConfig.FLAVOR.startsWith("full")) {
        return;
    }
    onView(Matchers.<View>instanceOf(BannerUpdatingRepos.class)).check(matches(not(isDisplayed())));
    onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
    onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click());
    onView(allOf(withId(R.id.swipe_to_refresh), isDisplayed()))
            .perform(swipeDown())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeUp())
            .perform(swipeDown())
            .perform(swipeUp())
            .perform(swipeDown())
            .perform(swipeDown())
            .perform(swipeDown())
            .perform(swipeDown())
            .perform(click());
}
 
Example #3
Source File: MainActivityTest.java    From android-testing-guide with MIT License 5 votes vote down vote up
@Test
@LargeTest
public void testLargeTest() {
    Log.d("Test Filters", "This is a large test");
    Activity activity = activityTestRule.getActivity();
    assertNotNull("MainActivity is not available", activity);
}
 
Example #4
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 5 votes vote down vote up
@LargeTest
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(R.id.list)).perform(swipeUp()).perform(swipeUp()).perform(swipeUp());
}
 
Example #5
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 5 votes vote down vote up
@LargeTest
public void startSwap() {
    if (!BuildConfig.FLAVOR.startsWith("full")) {
        return;
    }
    ViewInteraction nearbyBottonNavButton = onView(
            allOf(withText(R.string.main_menu__swap_nearby), isDisplayed()));
    nearbyBottonNavButton.perform(click());
    ViewInteraction findPeopleButton = onView(
            allOf(withId(R.id.find_people_button), withText(R.string.nearby_splash__find_people_button),
                    isDisplayed()));
    findPeopleButton.perform(click());
    onView(withText(R.string.swap_send_fdroid)).check(matches(isDisplayed()));
}
 
Example #6
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 5 votes vote down vote up
@LargeTest
public void showSearch() {
    onView(allOf(withText(R.string.menu_settings), isDisplayed())).perform(click());
    onView(withId(R.id.fab_search)).check(doesNotExist());
    if (!BuildConfig.FLAVOR.startsWith("full")) {
        return;
    }
    onView(allOf(withText(R.string.main_menu__latest_apps), isDisplayed())).perform(click());
    onView(allOf(withId(R.id.fab_search), isDisplayed())).perform(click());
    onView(withId(R.id.sort)).check(matches(isDisplayed()));
    onView(allOf(withId(R.id.search), isDisplayed()))
            .perform(click())
            .perform(typeText("test"));
    onView(allOf(withId(R.id.sort), isDisplayed())).perform(click());
}
 
Example #7
Source File: MainActivityEspressoTest.java    From fdroidclient with GNU General Public License v3.0 4 votes vote down vote up
@LargeTest
public void showUpdates() {
    ViewInteraction updatesBottonNavButton = onView(allOf(withText(R.string.main_menu__updates), isDisplayed()));
    updatesBottonNavButton.perform(click());
    onView(withText(R.string.main_menu__updates)).check(matches(isDisplayed()));
}