package Ġcom . j ako on . playground Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . action . View Actions . swipe Down Ċ import Ġandroidx . test . espress o . assertion . View Assertions . does NotExist Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . matcher . View Matchers .* ĊĊ Ċ fun Ġassert Views Have Text ( var arg Ġview Text Args : ĠPair < Int , ĠString ?> ) Ġ{ ĊĠĠĠ Ġview Text Args . forEach Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( it . first )). check ( matches ( with Text ( it . second ))) ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun Ġassert Views Have Text Res ( var arg Ġview Text Args : ĠPair < Int , ĠInt >) Ġ{ ĊĠĠĠ Ġview Text Args . forEach Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( it . first )). check ( matches ( with Text ( it . second ))) ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun Ġassert Text Is Displayed ( var arg Ġtexts : ĠString ) Ġ{ ĊĠĠĠ Ġtexts . forEach Ġ{ Ġon View ( with Text ( it )). check ( matches ( is Displayed ())) Ġ} Ċ } Ċ Ċ fun Ġassert Text Is Displayed ( text Res : ĠInt ) Ġ{ ĊĠĠĠ Ġon View ( with Text ( text Res )). check ( matches ( is Displayed ())) Ċ } Ċ Ċ fun Ġassert Text IsNot Displayed ( var arg Ġtexts : ĠString ) Ġ{ ĊĠĠĠ Ġtexts . forEach Ġ{ Ġon View ( with Text ( it )). check ( does NotExist ()) Ġ} Ċ } Ċ Ċ fun Ġswipe Down View ( view : ĠInt ) Ġ{ ĊĠĠĠ Ġon View ( with Id ( view )). perform ( swipe Down ()) Ċ } Ċ Ċ fun Ġclick On ( view Text : ĠString ) Ġ{ ĊĠĠĠ Ġon View ( with Text ( view Text )). perform ( click ()) Ċ }