Update screebshot diff tests to make the tests more stable.
Test: presubmit Bug: 256770697 Change-Id: Iad890d7fd11c1e1f032e8839ac9b57c656f790cd
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 75 KiB |
@@ -34,7 +34,7 @@ class ActionButtonsScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -32,7 +32,7 @@ class BarChartScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -33,7 +33,7 @@ class LineChartScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -31,7 +31,7 @@ class PieChartScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -31,7 +31,7 @@ class ImageIllustrationScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import com.android.settingslib.spa.framework.compose.stateOf
|
||||
import com.android.settingslib.spa.widget.preference.MainSwitchPreference
|
||||
import com.android.settingslib.spa.widget.preference.SwitchPreferenceModel
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -32,7 +32,7 @@ class MainSwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
@@ -45,7 +45,7 @@ class MainSwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("mainSwitchPreference") {
|
||||
RegularScaffold(title = "MainSwitchPreference") {
|
||||
Column {
|
||||
MainSwitchPreference(
|
||||
object : SwitchPreferenceModel {
|
||||
override val title = "MainSwitchPreference"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.Autorenew
|
||||
import androidx.compose.material.icons.outlined.DisabledByDefault
|
||||
@@ -23,7 +24,6 @@ import androidx.compose.runtime.Composable
|
||||
import com.android.settingslib.spa.framework.compose.toState
|
||||
import com.android.settingslib.spa.widget.preference.Preference
|
||||
import com.android.settingslib.spa.widget.preference.PreferenceModel
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import com.android.settingslib.spa.widget.ui.SettingsIcon
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@@ -37,7 +37,7 @@ class PreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
private const val TITLE = "Title"
|
||||
private const val SUMMARY = "Summary"
|
||||
private const val LONG_SUMMARY =
|
||||
@@ -54,7 +54,7 @@ class PreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("preference") {
|
||||
RegularScaffold(title = "Preference") {
|
||||
Column {
|
||||
Preference(object : PreferenceModel {
|
||||
override val title = TITLE
|
||||
})
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.Delete
|
||||
import androidx.compose.material.icons.outlined.SystemUpdate
|
||||
@@ -23,7 +24,6 @@ import androidx.compose.runtime.Composable
|
||||
import com.android.settingslib.spa.widget.preference.ProgressBarPreference
|
||||
import com.android.settingslib.spa.widget.preference.ProgressBarPreferenceModel
|
||||
import com.android.settingslib.spa.widget.preference.ProgressBarWithDataPreference
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import com.android.settingslib.spa.widget.ui.CircularProgressBar
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@@ -37,7 +37,7 @@ class ProgressBarPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
@@ -50,7 +50,7 @@ class ProgressBarPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("progressBar") {
|
||||
RegularScaffold(title = "ProgressBar") {
|
||||
Column {
|
||||
LargeProgressBar()
|
||||
SimpleProgressBar()
|
||||
ProgressBarWithData()
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.AccessAlarm
|
||||
import com.android.settingslib.spa.widget.preference.SliderPreference
|
||||
import com.android.settingslib.spa.widget.preference.SliderPreferenceModel
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -33,7 +33,7 @@ class SliderPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
@@ -46,7 +46,7 @@ class SliderPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("slider") {
|
||||
RegularScaffold(title = "Slider") {
|
||||
Column {
|
||||
SliderPreference(object : SliderPreferenceModel {
|
||||
override val title = "Simple Slider"
|
||||
override val initValue = 40
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.AirplanemodeActive
|
||||
import androidx.compose.runtime.Composable
|
||||
import com.android.settingslib.spa.framework.compose.stateOf
|
||||
import com.android.settingslib.spa.widget.preference.SwitchPreference
|
||||
import com.android.settingslib.spa.widget.preference.SwitchPreferenceModel
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import com.android.settingslib.spa.widget.ui.SettingsIcon
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@@ -36,7 +36,7 @@ class SwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
@@ -49,7 +49,7 @@ class SwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("switchPreference") {
|
||||
RegularScaffold(title = "SwitchPreference") {
|
||||
Column {
|
||||
SampleSwitchPreference()
|
||||
SampleSwitchPreferenceWithSummary()
|
||||
SampleNotChangeableSwitchPreference()
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
package com.android.settingslib.spa.screenshot
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import com.android.settingslib.spa.framework.compose.stateOf
|
||||
import com.android.settingslib.spa.widget.preference.TwoTargetSwitchPreference
|
||||
import com.android.settingslib.spa.widget.preference.SwitchPreferenceModel
|
||||
import com.android.settingslib.spa.widget.scaffold.RegularScaffold
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -32,7 +32,7 @@ class TwoTargetSwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
@@ -45,7 +45,7 @@ class TwoTargetSwitchPreferenceScreenshotTest(emulationSpec: DeviceEmulationSpec
|
||||
@Test
|
||||
fun test() {
|
||||
screenshotRule.screenshotTest("twoTargetSwitchPreference") {
|
||||
RegularScaffold(title = "TwoTargetSwitchPreference") {
|
||||
Column {
|
||||
TwoTargetSwitchPreference(object : SwitchPreferenceModel {
|
||||
override val title = "TwoTargetSwitchPreference"
|
||||
override val checked = stateOf(false)
|
||||
|
||||
@@ -29,7 +29,7 @@ class FooterScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||
@@ -29,7 +29,7 @@ class SpinnerScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletFull
|
||||
fun getTestSpecs() = DeviceEmulationSpec.PhoneAndTabletMinimal
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
||||