When using createEmptyComposeRule and launching the activity myself, is there a way to still perform actions and make assertions using the EmptyComposeRule? The activity needs to take in data using Intents, but is otherwise fully Compose. After I create an empty compose rule, then launch the activity using ActivityScenario.launch<MyActivity>(intent), I get an error when I try to make an assertion on the rule.
Landry Norris
10/03/2022, 5:45 PM
Copy code
No compose hierarchies found in the app. Possible reasons include: (1) the Activity that calls setContent did not launch; (2) setContent was not called; (3) setContent was called before the ComposeTestRule ran. If setContent is called by the Activity, make sure the Activity is launched after the ComposeTestRule runs
Landry Norris
10/03/2022, 5:46 PM
I have verified that setContent does indeed run in MyActivity before this happens.