cucumber / cucumber-android

Android support for Cucumber-JVM
MIT License
135 stars 62 forks source link

Support for Jetpack Compose #87

Closed lburcon closed 3 years ago

lburcon commented 3 years ago

Describe the bug When working with Compose and using AndroidComposeTestRule (or just ComposeTestRule), application is not being started at all when using CucumberAndroidJUnitRunner - looks like the rule is not being initiated. Everything works fine when using ActivityTestRule to start cucumber tests with CucumberAndroidJUnitRunner, but to make it work with Jetpack Comose I had to do plenty of tweaks in a local copy of compose-ui-testing library.

To Reproduce Create a simple test using createAndroidComposeRule<MainActivity>() and try launching Cucumber tests. Activity is not being started.

Expected behavior CucumberAndroidJUnitRunner should initialize the application and start tests.

Smartphone (please complete the following information): Any device

lsuski commented 3 years ago

Probably CucumberAndroidJUnitRunner does not work well with junit rules. I have plan to add support for compose in few months. Currently is hard to say for me what exactly will be needed.

lsuski commented 3 years ago

I've started working on this and support for junit rules should be available soon, I hope in 1-2 weeks if nothing unexpected happens.

lsuski commented 3 years ago

Will be available in 4.9.0

mochadwi commented 2 years ago

Finally!