package Ġcom . b odo ss . restaurant demo . ui Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . on Data Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . action . Type Text Action Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . matcher . View Matchers .* Ċ import Ġandroidx . test . ext . junit . rules . activity Scenario Rule Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġandroidx . test . filters . Large Test Ċ import Ġcom . b odo ss . restaurant demo . MainActivity Ċ import Ġcom . b odo ss . restaurant demo . R Ċ import Ġorg . hamcrest . Core Matchers . all Of Ċ import Ġorg . hamcrest . Core Matchers . not Ċ import Ġorg . hamcrest . Matchers Ċ import Ġorg . hamcrest . core . Is .` is ` Ċ import Ġorg . hamcrest . core . Is InstanceOf . instance Of Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith ĊĊ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ @ Large Test Ċ class ĠMain Screen Test Ġ{ ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġactivity Scenario Rule Ġ= Ġactivity Scenario Rule < MainActivity >() ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Sort () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . spinner )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon Data ( all Of (` is `( instance Of ( String :: class . java )), Ġ` is ` (" distance ")) ). perform ( click ()) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 5 0 0 ) ĊĠĠĠĠĠĠĠ Ġon View ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMatch ers . all Of ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġwith Text (" distance "), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnot ( is Desc endant Of A ( with Id ( R . id . rv ))) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Filter () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . edit Text )). perform ( Type Text Action (" t ano ")) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 5 0 0 ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text (" Tan osh ii ĠS ush i ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} Ċ Ċ }