agoda-com / Kakao

This repo is no longer supported. Please visit a https://github.com/KakaoCup/Kakao
Apache License 2.0
1.11k stars 102 forks source link

Does hasDrawable method work for AppCompatImageView? #237

Closed automaticqa closed 3 years ago

automaticqa commented 3 years ago

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 3 years ago

@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 3 years ago

Closing this issue due to no activity. You can reopen it if the issue is not solved.