KakaoCup / Kakao

Nice and simple DSL for Espresso in Kotlin

Home Page:https://kakaocup.github.io/Kakao/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to get Matcher of KBaseView

tevjef opened this issue · comments

commented

Relevant Code:

  private val header = KTextView { withText(R.string.text) }
  private val recyclerView = KRecyclerView({ withId(R.id.recyclerView) }, itemTypeBuilder = {})


  fun scrollToTextView() {
     // I want to do something like this
     recyclerView.scrollTo(header.getViewMatchers()) 
     // Potentially to have an extension func to do this 
     recyclerView.scrollTo(header)
     // As it currently stands, it seems like I have to redefine my matchers.
     recyclerView.scrollTo { withText(R.string.text) } 
  }

In short I would like access to the matchers all KBaseView was initialized with.

@tevjef hey mate! Probably you can achieve the same behaviour with header.scrollTo(). Did you try that?

Inactivity close