Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d67f55c authored by Jim Shargo's avatar Jim Shargo
Browse files

Revert "Adding back screenshot test to Settings."

This reverts commit 4dc4e1c0.

Reason for revert: broke the build

Change-Id: I3037248a5df06d6f92dfa9c5666625f23230646a
Bug: 307406217
parent 4dc4e1c0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@

    <LinearLayout
        style="@style/SudContentFrame"
        android:id="@+id/enroll_intro_content_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
+0 −3
Original line number Diff line number Diff line
@@ -186,9 +186,6 @@ class FingerprintEnrollIntroV2Fragment() : Fragment(R.layout.fingerprint_v2_enro
      return view
    }

  /**
   * TODO (b/305269201): This link isn't displaying for screenshot tests.
   */
  private fun setFooterLink(view: View) {
    val footerLink: TextView = view.requireViewById(R.id.footer_learn_more)
    footerLink.movementMethod = LinkMovementMethod.getInstance()

tests/screenshot/Android.bp

deleted100644 → 0
+0 −64
Original line number Diff line number Diff line
//
// Copyright (C) 2023 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.

android_app {
    name: "ScreenshotTestStub",
    defaults: [
        "SettingsLibDefaults",
    ],
    platform_apis: true,
    certificate: "platform",
    privileged: true,
    use_resource_processor: true,

    static_libs: [
        "Settings-core",
        "androidx.fragment_fragment-testing",
        "androidx.fragment_fragment",
    ],

    aaptflags: ["--extra-packages com.android.settings"],
}

android_test {
    name: "SettingsScreenshotTests",
    platform_apis: true,
    certificate: "platform",
    test_suites: ["device-tests"],
    srcs: [
        "src/**/*.kt",
    ],
    static_libs: [
        "androidx.fragment_fragment-testing",
        "androidx.fragment_fragment",
        "androidx.test.rules",
        "androidx.test.ext.junit",
        "platform-screenshot-diff-core",
        "Settings-testutils2",
        "androidx.test.core",
        "androidx.test.espresso.core",
        "kotlinx-coroutines-android",
        "androidx.lifecycle_lifecycle-runtime-testing",
        "kotlinx_coroutines_test",
        "Settings-core",
        "androidx.test.runner",
    ],
    compile_multilib: "both",
    manifest: "AndroidManifest.xml",
    test_config: "AndroidTest.xml",
    use_embedded_native_libs: false,
    asset_dirs: ["assets"],
    instrumentation_for: "ScreenshotTestStub",
}
+0 −47
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2023 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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.settings.tests.screenshot"
    >

    <application>
        <uses-library android:name="android.test.runner" />
        <provider
            android:name="com.android.settings.slices.SettingsSliceProvider"
            android:authorities="com.android.settings.tests.screenshot.disabled"
            android:enabled="false"
            tools:node="remove"
            tools:replace="android:authorities" />
    </application>

    <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />

    <instrumentation
        android:name="androidx.test.runner.AndroidJUnitRunner"
        android:label="Android Settings Screenshot tests"
        android:targetPackage="com.android.settings.tests.screenshot" />

</manifest>

tests/screenshot/AndroidTest.xml

deleted100644 → 0
+0 −36
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2023 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.
  -->

<configuration description="Runs settings screendiff tests.">
    <option name="test-suite-tag" value="apct-instrumentation" />
    <option name="test-suite-tag" value="apct" />
    <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
        <option name="optimized-property-setting" value="true" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="SettingsScreenshotTests.apk" />
    </target_preparer>
    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys"
            value="/data/user/0/com.android.settings.tests.screenshot/" />
        <option name="collect-on-run-ended-only" value="true" />
    </metrics_collector>
    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
        <option name="package" value="com.android.settings.tests.screenshot" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
    </test>
</configuration>
Loading