Skip to content

End to End tests fail in the more recent compose versions #5

@NunoPontes

Description

@NunoPontes

Hello Philipp,

I've really enjoyed this course, congrats.

I've been upgrading the dependencies on this project to test something, and when I upgrade:

Gradle to 7.2.1
Kotlin to 1.6.21
Compose to 1.2.0-beta03

When running the TrackerOverviewE2E tests I get the following error:

com.plcoding.calorytracker.MainActivity@24abf32 has already set content. If you have populated the Activity with a ComposeView, make sure to call setContent on that ComposeView instead of on the test rule; and make sure that that call to setContent {} is done after the ComposeTestRule has run at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$AndroidComposeUiTestImpl.setContent(ComposeUiTest.android.kt:470) at androidx.compose.ui.test.junit4.AndroidComposeTestRule.setContent(AndroidComposeTestRule.android.kt:200) at com.plcoding.calorytracker.TrackerOverviewE2E.setUp(TrackerOverviewE2E.kt:101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions