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

Commit e59da0bd authored by Mike Schneider's avatar Mike Schneider
Browse files

Reset display settings applied via [DeviceEmulationRule]

This fixes flakiness on other STL tests, that implicitly depend on the devices' resolution.

Test: AnchoredSizeTest
Flag: TEST_ONLY
Bug: 366151530
Change-Id: I5a2645a2b6e13c7d90d9a1edda616e72f079a7ef
parent 1fbb32e9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -31,16 +31,23 @@ import com.android.compose.animation.scene.TransitionBuilder
import com.android.compose.animation.scene.TransitionRecordingSpec
import com.android.compose.animation.scene.featureOfElement
import com.android.compose.animation.scene.recordTransition
import org.junit.ClassRule
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import platform.test.motion.compose.ComposeFeatureCaptures
import platform.test.motion.compose.createComposeMotionTestRule
import platform.test.motion.testing.createGoldenPathManager
import platform.test.screenshot.ResetDeviceEmulationRule

@RunWith(AndroidJUnit4::class)
@MotionTest
class AnchoredSizeTest {

    companion object {
        @JvmField @ClassRule val cleanupRule: ResetDeviceEmulationRule = ResetDeviceEmulationRule()
    }

    private val goldenPaths =
        createGoldenPathManager("frameworks/base/packages/SystemUI/compose/scene/tests/goldens")