android.support.test.filters.LargeTest源码实例Demo

类android.support.test.filters.LargeTest源码实例Demo

下面列出了android.support.test.filters.LargeTest 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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());
}
 
源代码2 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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());
}
 
源代码3 项目: android-testing-guide   文件: MainActivityTest.java
@Test
@LargeTest
public void testLargeTest() {
    Log.d("Test Filters", "This is a large test");
    Activity activity = activityTestRule.getActivity();
    assertNotNull("MainActivity is not available", activity);
}
 
源代码4 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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());
}
 
源代码5 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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()));
}
 
源代码6 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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());
}
 
源代码7 项目: fdroidclient   文件: MainActivityEspressoTest.java
@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()));
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法