Does hasDrawable method work for AppCompatImageView?
automaticqa opened this issue · 2 comments
automaticqa commented
Hello, guys!
I try to check AppCompatImageView with method hasDrawable().
val appCompatImageView = KImageView { withId(R.id.favorite) }
appCompatImageView {
hasDrawable(R.drawable.favorite_border)
}
However i get next error:
junit.framework.AssertionFailedError: 'with drawable id 2131230981 or provided instance' doesn't match the selected view.
Expected: with drawable id 2131230981 or provided instance
Got: "AppCompatImageView{id=2131427857, res-name=favorite, visibility=VISIBLE, width=105, height=105, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@77e0b02, tag=null, root-is-layout-requested=false, has-input-connection=false, x=242.0, y=105.0}"
Can you tell me please what's wrong with it?
Vacxe commented
@StanlyT could u send the .xml
configuration and API of emulator please?
We have similar issue if android:scaleType=
has been set. Does it is your case?
Unlimity commented
Closing this issue due to no activity. You can reopen it if the issue is not solved.