mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Assert independent opacity in the legacy migration test
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user