https://kotlinlang.org logo
#compose
Title
# compose
a

Arun

11/20/2020, 11:22 AM
According to doc:
Copy code
@get:Rule
val composeTestRule =
  AndroidComposeTestRule<MyActivity>(disableTransitions = true)
However, there’s no such parameter
disableTransitions
. Is there any alternative way to disable animations and transitions while testing?
a

allan.conda

11/20/2020, 11:26 AM
It should be available from alpha07 I think
before it was forced set to true afair
I could be wrong
a

Arun

11/20/2020, 11:27 AM
@allan.conda I’m currently on alpha07 and I still don’t see any such parameter. Also while testing, I can clearly see Snackbars animating and tests failing.
a

allan.conda

11/20/2020, 11:28 AM
Transitions can no longer be disabled through AndroidComposeTestRule.
You now have to manually add a DisableTransitionsTestRule if you
absolutely need to disable them. For example, ComposeBenchmarkRule
still disables transitions.
since alpha06
a

Arun

11/20/2020, 11:29 AM
Oh, thanks for the info. Will look at it 👍
Thanks @allan.conda. Tests are working! 🙂
a

allan.conda

11/20/2020, 11:46 AM
nice
11 Views