From da5bee2daf661b85aad474340be2a7a8ed8bf3e6 Mon Sep 17 00:00:00 2001 From: Arnold Noronha Date: Mon, 19 Sep 2022 13:47:02 -0400 Subject: [PATCH] Correctly builds now --- .../screenshot/sample/SpinnerActivityTest.kt | 41 --------------- .../screenshot/sample/SpinnerActivity.kt | 44 ---------------- src/main/res/layout/spinner_activity.xml | 50 ------------------- 3 files changed, 135 deletions(-) delete mode 100644 src/androidTest/java/com/facebook/testing/screenshot/sample/SpinnerActivityTest.kt delete mode 100644 src/main/java/com/facebook/testing/screenshot/sample/SpinnerActivity.kt delete mode 100644 src/main/res/layout/spinner_activity.xml diff --git a/src/androidTest/java/com/facebook/testing/screenshot/sample/SpinnerActivityTest.kt b/src/androidTest/java/com/facebook/testing/screenshot/sample/SpinnerActivityTest.kt deleted file mode 100644 index 7088083..0000000 --- a/src/androidTest/java/com/facebook/testing/screenshot/sample/SpinnerActivityTest.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * 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.facebook.testing.screenshot.sample - - -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 -import org.junit.Test - -class SpinnerActivityTest { - @get:Rule - var activityTestRule = ActivityTestRule(SpinnerActivity::class.java, false, false) - - @Test - fun testScreenshotEntireActivity() { - val activity = activityTestRule.launchActivity(null) - Screenshot.snapActivity(activity).record() - } -} diff --git a/src/main/java/com/facebook/testing/screenshot/sample/SpinnerActivity.kt b/src/main/java/com/facebook/testing/screenshot/sample/SpinnerActivity.kt deleted file mode 100644 index 2d51ded..0000000 --- a/src/main/java/com/facebook/testing/screenshot/sample/SpinnerActivity.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * 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.facebook.testing.screenshot.sample - -import android.content.Context -import android.content.Intent -import android.os.Bundle -import androidx.annotation.ColorRes -import com.google.android.material.floatingactionbutton.FloatingActionButton -import com.google.android.material.snackbar.Snackbar -import androidx.core.content.ContextCompat -import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.widget.Toolbar -import android.view.Menu -import android.view.View -import android.widget.TextView -import com.facebook.litho.LithoView -import android.widget.ProgressBar - -class SpinnerActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.spinner_activity) - setSupportActionBar(findViewById(R.id.toolbar)) - - val pb = findViewById(R.id.spinner) as ProgressBar - pb.setInterpolator({ input -> 0.5f }) - } - -} diff --git a/src/main/res/layout/spinner_activity.xml b/src/main/res/layout/spinner_activity.xml deleted file mode 100644 index c07cda2..0000000 --- a/src/main/res/layout/spinner_activity.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - -