diff options
author | Guang Zhu <guangzhu@google.com> | 2014-11-13 19:45:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-13 19:45:27 +0000 |
commit | f9b3351f18ae617ea4debddce931a9381ab76a4c (patch) | |
tree | 860c5d00013dbf6de4c80019e33bd7e87e0c8cce /espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java | |
parent | 61a929bd4642b9042bfb05b85340c1761ab90733 (diff) | |
parent | a693520e12c4a00813e3dc3b4ad2ca2edc9e8f38 (diff) | |
download | testing-master.tar.gz |
Merge "remove Espresso source code"HEADandroid-wear-5.0.0_r1master-soongmastermainlollipop-wear-release
Diffstat (limited to 'espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java')
-rw-r--r-- | espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java b/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java deleted file mode 100644 index 60ca48b..0000000 --- a/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/action/ScrollToActionIntegrationTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.apps.common.testing.ui.espresso.action; - -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; -import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; - -import com.google.android.apps.common.testing.ui.testapp.R; -import com.google.android.apps.common.testing.ui.testapp.ScrollActivity; - -import android.test.ActivityInstrumentationTestCase2; -import android.test.suitebuilder.annotation.LargeTest; - -/** - * Tests for ScrollToAction. - */ -@LargeTest -public class ScrollToActionIntegrationTest extends ActivityInstrumentationTestCase2<ScrollActivity> -{ - @SuppressWarnings("deprecation") - public ScrollToActionIntegrationTest() { - // Keep froyo happy. - super("com.google.android.apps.common.testing.ui.testapp", ScrollActivity.class); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - getActivity(); - } - - public void testScrollDown() { - onView(withId(is(R.id.bottom_left))) - .check(matches(not(isDisplayed()))) - .perform(scrollTo()) - .check(matches(isDisplayed())) - .perform(scrollTo()); // Should be a noop. - } - - public void testScrollVerticalAndHorizontal() { - onView(withId(is(R.id.bottom_right))) - .check(matches(not(isDisplayed()))) - .perform(scrollTo()) - .check(matches(isDisplayed())); - onView(withId(is(R.id.top_left))) - .check(matches(not(isDisplayed()))) - .perform(scrollTo()) - .check(matches(isDisplayed())); - } - - public void testScrollWithinScroll() { - onView(withId(is(R.id.double_scroll))) - .check(matches(not(isDisplayed()))) - .perform(scrollTo()) - .check(matches(isDisplayed())); - } -} |