Assert independent opacity in the legacy migration test

This commit is contained in:
Kurt Himebauch committed 2026-12-05 17:26:31 -05:00
1 parent cbf152bb3a
commit 20c7cf8b7c
1 file changed
+3 -3
@@ -447,11 +447,11 @@ class InputLibraryTest {
assertEquals(true, overlay.adaptiveSticks)
}
@Test fun theOldGamepadOpacityBecomesTheOneOnScreenOpacityAndClamps() {
@Test fun legacyLayoutOpacitySurvivesAndGlobalOpacityClampsIndependently() {
ControllerPrefs.setOpacity(context, 60)
val layout = InputLibraries.read(context).activeLayout(false, InputRole.PRIMARY)!!
assertEquals(100, layout.style.opacity)
assertEquals(60, ControllerPrefs.read(context).onScreenOpacity)
assertEquals(60, layout.style.opacity)
assertEquals(100, ControllerPrefs.read(context).onScreenOpacity)
for ((requested, expected) in listOf(0 to 10, 45 to 45, 101 to 100)) {
ControllerPrefs.setOnScreenOpacity(context, requested)
assertEquals(expected, ControllerPrefs.read(context).onScreenOpacity)