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

Commit 4c21a7cd authored by Andrew Xu's avatar Andrew Xu Committed by Android (Google) Code Review
Browse files

Merge "Refactor SystemUITests module to help create SystemUITests_desktop" into main

parents a7c59ed9 f9541469
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -171,6 +171,9 @@
  "desktop-presubmit": [
    {
      "name": "SystemUIGoogleScreenshotTests_desktop"
    },
    {
      "name": "SystemUITests_desktop"
    }
  ],

+19 −4
Original line number Diff line number Diff line
@@ -19,8 +19,18 @@ package {
    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}

android_test {
    name: "SystemUITests",
filegroup {
    name: "systemui_tests_base_manifest",
    srcs: ["AndroidManifest-base.xml"],
}

filegroup {
    name: "systemui_tests_additional_manifest",
    srcs: ["AndroidManifest.xml"],
}

java_defaults {
    name: "SystemUITests_defaults",
    use_resource_processor: true,
    defaults: ["systemui-non-platform-apis-defaults"],
    dxflags: ["--multi-dex"],
@@ -47,8 +57,13 @@ android_test {
    // UI it doesn't own. This is necessary to allow screenshots to be taken
    certificate: "platform",

    additional_manifests: ["AndroidManifest.xml"],
    manifest: "AndroidManifest-base.xml",
    additional_manifests: [":systemui_tests_additional_manifest"],
    manifest: ":systemui_tests_base_manifest",
}

android_test {
    name: "SystemUITests",
    defaults: ["SystemUITests_defaults"],
}

test_module_config {
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.brightness.ui.compose

import android.content.res.Configuration
import android.platform.test.annotations.WithDesktopTest
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.runtime.CompositionLocalProvider
@@ -66,6 +67,7 @@ class BrightnessSliderTest : SysuiTestCase() {
    private var localeConfiguration by mutableStateOf(englishLocaleConfiguration)

    @Test
    @WithDesktopTest
    fun stateDescription_hasPercentage() {
        val value = 25
        val range = 0..200