Hi, We recently found a very peculiar issue with t...
# compose
a
Hi, We recently found a very peculiar issue with the
testTag
. We have a
Composable
that gets data from two different sources (flows) as state. In case of debug/release builds everything works fine. The problem starts appearing only when running Espresso (Compose Android Test Rule). When the test is run some of the state is omitted and the changes to the state do not cause any recompositions, even though when running on release/debug it works fine. We managed to pinpoint the problem (which we still have troubles with believing) to the
testTag
for one of the components that are displaying the data from the states. Removing the
testTag
corrects the problem and everything works fine. Adding it back reintroduces the issue. As much as it sounds silly, we would like to understand why is it happening. What sorts of things the
semantics
is adding that the
testTag
could have such a result? Do you have any experiences with this?
z
This seems very weird. If you can reproduce in a small sample, please file a bug.
a
We are working hard on reproducing this in a smaller scope but with no success yet. It works fine so far in the isolated micro examples.
After a bit of changes we found out that adding a
semantics
Modifier with things like
role
,
contentDescription
or
stateDescription
does not have any impact. Still adding the
testTag
has. Regardless if added in the
semantics
block or through the convenience method called
testTag(String)