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

Commit 5ee7b514 authored by Kelly Zhang's avatar Kelly Zhang Committed by Android (Google) Code Review
Browse files

Merge "Delete SPA unit test lottie_displayed, because it fails online and only...

Merge "Delete SPA unit test lottie_displayed, because it fails online and only works offline on device."
parents af7d9b6c 72a7b701
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -65,26 +65,6 @@ class IllustrationTest {
    private val RawId = SemanticsPropertyKey<Int>("RawResId")
    private var SemanticsPropertyReceiver.rawId by RawId

    @Test
    fun lottie_displayed() {
        val resId = R.raw.accessibility_shortcut_type_triple_tap
        composeTestRule.setContent {
            Illustration(
                resId = resId,
                resourceType = ResourceType.LOTTIE,
                modifier = Modifier.semantics { rawId = resId }
            )
        }

        fun hasRaw(@RawRes id: Int): SemanticsMatcher =
            SemanticsMatcher.expectValue(RawId, id)

        val isIllustrationNode = hasAnyAncestor(hasRaw(resId))
        composeTestRule.onAllNodes(hasRaw(resId))
            .filterToOne(isIllustrationNode)
            .assertIsDisplayed()
    }

    @Test
    fun empty_lottie_not_displayed() {
        val resId = R.raw.empty