Trying to verify my snack bar been shown
Calling
onView(withText(R.string.checkout_device_error))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
Due to the debugger everything goes fine and method make it visible but test fail
'view has effective visibility=VISIBLE' doesn't match the selected view.
Expected: view has effective visibility=VISIBLE
Got: "MaterialTextView{id=2131362495, res-name=ribbon_text, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@7c97dc7f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Invalid username and or password., input-type=0, ime-target=false, has-links=false}"