KakaoCup / Kakao

Nice and simple DSL for Espresso in Kotlin
https://kakaocup.github.io/Kakao/
Apache License 2.0
325 stars 28 forks source link

Add support text view style assertions bold and italic #59

Closed hongwei-bai closed 2 years ago

hongwei-bai commented 2 years ago

Hi @Vacxe , feel typeface match might be quite strict sometimes(has to match style and weight too), maybe add this one as well for a few simple scenarios?

Vacxe commented 2 years ago

@hongwei-bai I terribly sorry, but I think will be better to have two separates ItalicStyleMatcher() and BoldStyleMatcher() without any parameters for constructor and then for negative assertion just use not(<Matcher>)

https://stackoverflow.com/questions/28431647/matchesnotisdisplayed-fails-with-nomatchingviewexception

With this approach we will have single responsibility + avoiding Boolean in constructor

hongwei-bai commented 2 years ago

@hongwei-bai I terribly sorry, but I think will be better to have two separates ItalicStyleMatcher() and BoldStyleMatcher() without any parameters for constructor and then for negative assertion just use not(<Matcher>)

https://stackoverflow.com/questions/28431647/matchesnotisdisplayed-fails-with-nomatchingviewexception

With this approach we will have single responsibility + avoiding Boolean in constructor

sure np @Vacxe. tbh I was swinging betweens the two. will make the changes. Thanks! 👍