package Ġcom . android . mobile . util Ċ Ċ import Ġcom . android . mobile . R Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ 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 . is Displayed Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Text Ċ import Ġandroid . view . View Ċ import Ġorg . hamcrest . Matchers . all Of Ċ Ċ object ĠError TestUtil Ġ{ ĊĊĠĠĠ Ġfun Ġcheck Error Views Display () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of < View >( with Text ( R . string . error _ title ), Ġis Displayed ())) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( all Of < View >( with Text ( R . string . error _ message ), Ġis Displayed ())) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġcheck Click ing Reload Shows Content With Text ( expected Text : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of < View >( with Text ( R . string . error _ reload ), Ġis Displayed ())) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( expected Text )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} Ċ Ċ } Ċ