google / automotive-design-compose

Automotive Design for Compose is an extension to Jetpack Compose that allows every screen, component, and overlay of your Android App to be defined in Figma, and lets you see the latest changes to your Figma design in your app, immediately!
https://google.github.io/automotive-design-compose/
Apache License 2.0
101 stars 14 forks source link

Gradle task fetchAndUpdateFigmaFiles fails on integration tests #1028

Open rylin8 opened 3 weeks ago

rylin8 commented 3 weeks ago

When running ./gradlew fetchAndUpdateFigmaFiles after making a breaking change to the serialized document format, the task fails because the integration tests on Interaction, VariantProperties and VariantAnimation fail. This may be because the tests are run on the old version of the .dcf file instead of run after fetching new ones.

In addition, it would be great if this task could also update:

This would make it much easier to update all .dcf files, as I currently have to manually update these 6 files before running the task.

Error example:

com.android.designcompose.testapp.validation.AnimationMidpoints > variantAnimation FAILED
    java.lang.AssertionError: Failed to assert the following: (DocRenderStatus = 'Rendered')
    Can't retrieve node at index '0' of 'DocClass = 'com.android.designcompose.testapp.validation.examples.VariantAnimationTestGen''
    There are no existing nodes for that selector.
        at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrDie(SemanticsNodeInteraction.kt:175)
        at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrDie$default(SemanticsNodeInteraction.kt:150)
        at androidx.compose.ui.test.SemanticsNodeInteraction.fetchSemanticsNode(SemanticsNodeInteraction.kt:84)
        at androidx.compose.ui.test.AssertionsKt.assert(Assertions.kt:263)
        at androidx.compose.ui.test.AssertionsKt.assert$default(Assertions.kt:255)
        at com.android.designcompose.test.InstrumentedTestUtilsKt.assertRenderStatus(InstrumentedTestUtils.kt:31)
        at com.android.designcompose.testapp.validation.AnimationMidpoints.variantAnimation(AnimationMidpoints.kt:74)
timothyfroehlich commented 3 weeks ago

Assigning to Ralph for priority