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

Commit bdd9783e authored by Chris Poultney's avatar Chris Poultney Committed by Android (Google) Code Review
Browse files

Merge "Resolves test resource issues and re-enables test" into main

parents 6c778cce 26f39517
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -2,22 +2,30 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_app {
    name: "ThemePickerShell",
    defaults: ["ThemePicker_defaults"],
    platform_apis: true,
    static_libs: ["ThemePickerTestLib"],
}

android_robolectric_test {
    name: "ThemePickerRoboTests",
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
    ],
    // TODO(b/291104503) Enable this test
    exclude_srcs: ["src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt"],
    java_resource_dirs: ["config"],

    // Do not add picker-related dependencies here. Add them to ThemePickerShell
    // instead.
    static_libs: [
        "WallpaperPicker2TestLib",
        "androidx.test.rules",
        "junit",
        "kotlinx_coroutines_test",
        "truth",
    ],

    libs: [
        "androidx.test.core",
        "androidx.test.runner",
@@ -25,5 +33,5 @@ android_robolectric_test {

    upstream: true,

    instrumentation_for: "ThemePicker",
    instrumentation_for: "ThemePickerShell",
}
+0 −34
Original line number Diff line number Diff line
<!--
   Copyright (C) 2019 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.
-->
<resources>
  <!-- overlayable_icons references all of the drawables in this package
       that are being overlayed by resource overlays. If you remove/rename
       any of these resources, you must also change the resource overlay icons.-->
  <array name="overlayable_icons">
    <item>@drawable/ic_add_24px</item>
    <item>@drawable/ic_close_24px</item>
    <item>@drawable/ic_colorize_24px</item>
    <item>@drawable/ic_delete_24px</item>
    <item>@drawable/ic_font</item>
    <item>@drawable/ic_nav_clock</item>
    <item>@drawable/ic_nav_grid</item>
    <item>@drawable/ic_nav_theme</item>
    <item>@drawable/ic_nav_wallpaper</item>
    <item>@drawable/ic_shapes_24px</item>
    <item>@drawable/ic_tune</item>
    <item>@drawable/ic_wifi_24px</item>
  </array>
</resources>
+20 −4
Original line number Diff line number Diff line
@@ -353,8 +353,16 @@ class KeyguardQuickAffordancePickerViewModelTest {
                                "${FakeCustomizationProviderClient.AFFORDANCE_1}," +
                                    " ${FakeCustomizationProviderClient.AFFORDANCE_3}"
                            ),
                        icon1 = Icon.Loaded(FakeCustomizationProviderClient.ICON_1, null),
                        icon2 = Icon.Loaded(FakeCustomizationProviderClient.ICON_3, null),
                        icon1 =
                            Icon.Loaded(
                                FakeCustomizationProviderClient.ICON_1,
                                Text.Loaded("Left shortcut")
                            ),
                        icon2 =
                            Icon.Loaded(
                                FakeCustomizationProviderClient.ICON_3,
                                Text.Loaded("Right shortcut")
                            ),
                    )
                )
        }
@@ -373,7 +381,11 @@ class KeyguardQuickAffordancePickerViewModelTest {
                .isEqualTo(
                    KeyguardQuickAffordanceSummaryViewModel(
                        description = Text.Loaded(FakeCustomizationProviderClient.AFFORDANCE_1),
                        icon1 = Icon.Loaded(FakeCustomizationProviderClient.ICON_1, null),
                        icon1 =
                            Icon.Loaded(
                                FakeCustomizationProviderClient.ICON_1,
                                Text.Loaded("Left shortcut")
                            ),
                        icon2 = null,
                    )
                )
@@ -397,7 +409,11 @@ class KeyguardQuickAffordancePickerViewModelTest {
                    KeyguardQuickAffordanceSummaryViewModel(
                        description = Text.Loaded(FakeCustomizationProviderClient.AFFORDANCE_3),
                        icon1 = null,
                        icon2 = Icon.Loaded(FakeCustomizationProviderClient.ICON_3, null),
                        icon2 =
                            Icon.Loaded(
                                FakeCustomizationProviderClient.ICON_3,
                                Text.Loaded("Right shortcut")
                            ),
                    )
                )
        }