From f62c437f93cfd659490bd653e5ef1a64e7630365 Mon Sep 17 00:00:00 2001 From: Hilal Alsibai Date: Tue, 11 Jun 2019 10:04:14 -0700 Subject: [PATCH] Convert sample app's screenshot tests to AndroidX Summary: Everything else was converted, somehow missed these. Reviewed By: sjkirby Differential Revision: D15754330 fbshipit-source-id: e0d05978d5ae456e2e294f72e56ece12dcaf9dce --- .../screenshot/sample/ExampleScreenshotTest.java | 2 +- .../screenshot/sample/ImageRowScreenshotTest.java | 2 +- .../testing/screenshot/sample/MainActivityTest.kt | 13 +++++++------ .../screenshot/sample/ScreenshotTestRunner.kt | 2 +- .../screenshot/sample/ScreenshotViewAction.kt | 6 +++--- .../screenshot/sample/StandardAndroidViewTest.kt | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ExampleScreenshotTest.java b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ExampleScreenshotTest.java index 7e0db3b6..8df8c4fb 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ExampleScreenshotTest.java +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ExampleScreenshotTest.java @@ -7,8 +7,8 @@ package com.facebook.testing.screenshot.sample; import android.content.Context; -import android.support.test.InstrumentationRegistry; import android.view.LayoutInflater; +import androidx.test.platform.app.InstrumentationRegistry; import com.facebook.litho.LithoView; import com.facebook.testing.screenshot.Screenshot; import com.facebook.testing.screenshot.ViewHelpers; diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ImageRowScreenshotTest.java b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ImageRowScreenshotTest.java index 91224642..5637b90d 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ImageRowScreenshotTest.java +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ImageRowScreenshotTest.java @@ -7,8 +7,8 @@ package com.facebook.testing.screenshot.sample; import android.content.Context; -import android.support.test.InstrumentationRegistry; import android.view.LayoutInflater; +import androidx.test.platform.app.InstrumentationRegistry; import com.facebook.litho.LithoView; import com.facebook.testing.screenshot.Screenshot; import com.facebook.testing.screenshot.ViewHelpers; diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/MainActivityTest.kt b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/MainActivityTest.kt index d29d7cf5..60011982 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/MainActivityTest.kt +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/MainActivityTest.kt @@ -8,13 +8,14 @@ package com.facebook.testing.screenshot.sample -import android.support.test.espresso.Espresso.onView -import android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu -import android.support.test.espresso.action.ViewActions.click -import android.support.test.espresso.matcher.ViewMatchers.isDisplayed -import android.support.test.espresso.matcher.ViewMatchers.withId -import android.support.test.rule.ActivityTestRule + import android.view.View +import androidx.test.espresso.Espresso.onView +import androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu +import androidx.test.espresso.action.ViewActions.click +import androidx.test.espresso.matcher.ViewMatchers.isDisplayed +import androidx.test.espresso.matcher.ViewMatchers.withId +import androidx.test.rule.ActivityTestRule import com.facebook.testing.screenshot.Screenshot import org.hamcrest.core.AllOf.allOf import org.junit.Rule diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotTestRunner.kt b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotTestRunner.kt index dc755e2d..7e917529 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotTestRunner.kt +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotTestRunner.kt @@ -9,7 +9,7 @@ package com.facebook.testing.screenshot.sample import android.os.Bundle -import android.support.test.runner.AndroidJUnitRunner +import androidx.test.runner.AndroidJUnitRunner import com.facebook.litho.config.ComponentsConfiguration import com.facebook.testing.screenshot.ScreenshotRunner import com.facebook.testing.screenshot.layouthierarchy.LayoutHierarchyDumper diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotViewAction.kt b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotViewAction.kt index 64e11d94..e5407496 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotViewAction.kt +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/ScreenshotViewAction.kt @@ -8,11 +8,11 @@ package com.facebook.testing.screenshot.sample -import android.support.test.espresso.matcher.ViewMatchers.isDisplayed -import android.support.test.espresso.UiController -import android.support.test.espresso.ViewAction import android.view.View +import androidx.test.espresso.UiController +import androidx.test.espresso.ViewAction +import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import com.facebook.testing.screenshot.Screenshot import org.hamcrest.Matcher diff --git a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/StandardAndroidViewTest.kt b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/StandardAndroidViewTest.kt index 71fcb100..874465e8 100644 --- a/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/StandardAndroidViewTest.kt +++ b/sample/src/androidTest/java/com/facebook/testing/screenshot/sample/StandardAndroidViewTest.kt @@ -8,10 +8,10 @@ package com.facebook.testing.screenshot.sample -import android.support.test.InstrumentationRegistry import android.view.LayoutInflater import android.view.View import android.widget.TextView +import androidx.test.platform.app.InstrumentationRegistry import com.facebook.testing.screenshot.Screenshot import com.facebook.testing.screenshot.ViewHelpers import org.junit.Test