From c2c79877fc8343b7a6ebaca52f08a1cef066329b Mon Sep 17 00:00:00 2001 From: Gabriel Peal Date: Sat, 14 Dec 2024 18:22:29 -0800 Subject: [PATCH] Fix test case --- .../lottie/snapshots/tests/TextTestCase.kt | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt index 297e9a7e70..a8d205d073 100644 --- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt +++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt @@ -211,20 +211,9 @@ class TextTestCase : SnapshotTestCase { LaunchedEffect(snapshotReady, composition != null) { snapshotReady.value = composition != null } - val dynamicProperties = rememberLottieDynamicProperties( - rememberLottieDynamicProperty( - LottieProperty.TEXT, - // Family emoji - "\uD83D\uDC68\u200D\uD83D\uDC69\u200D\uD83D\uDC66", - "Text", - ), - ) - LottieAnimation( - composition, - { 0f }, - dynamicProperties = dynamicProperties, - fontMap = mapOf("Helvetica" to Typeface.DEFAULT), - ) + rememberLottieDynamicProperty(LottieProperty.TEXT, "NAME") { frameInfo -> + "${frameInfo.endValue}!!!" + }, } snapshotComposable("Compose Dynamic Text", "Centered") { @@ -234,8 +223,8 @@ class TextTestCase : SnapshotTestCase { snapshotReady.value = composition != null } val dynamicProperties = rememberLottieDynamicProperties( - rememberLottieDynamicProperty(LottieProperty.TEXT, "Text") { frameInfo -> - "${frameInfo.startValue}!!!" + rememberLottieDynamicProperty(LottieProperty.TEXT, "NAME") { frameInfo -> + "${frameInfo.endValue}!!!" }, ) LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)