package Ġio . github . om is ie 1 1 . cor on at rack er . espress o Ċ Ċ import Ġandroid . app . Instrumentation Ċ import Ġandroid . content . Intent Ċ import Ġandroid . content . res . Resources Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . contrib . RecyclerView Actions . action On Item At Position Ċ import Ġandroidx . test . espress o . intent . Intent s Ċ import Ġandroidx . test . espress o . intent . matcher . Intent Matchers . has Action Ċ import Ġandroidx . test . espress o . intent . matcher . Intent Matchers . has Data Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġio . github . om is ie 1 1 . cor on at rack er . R Ċ import Ġio . github . om is ie 1 1 . cor on at rack er . ui . MainActivity Ċ import Ġorg . hamcrest . Matchers . all Of Ċ import Ġorg . junit . After Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠAbout Screen Esp ress o Tests Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġapp Resources : ĠResources ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġactivity Rule Ġ= ĠActivity Test Rule ( MainActivity :: class . java ) ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġapp Resources Ġ= ĠInstrument ation Registry . get Instrumentation (). target Context . resources ĊĠĠĠĠĠĠĠ ĠInt ents . init () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ After ĊĠĠĠ Ġfun ĠtearDown () Ġ{ ĊĠĠĠĠĠĠĠ ĠInt ents . release () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On GitHub Profile Chip _ browser Should Open () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Action ( Intent . ACTION _ VIEW ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Data ( app Resources . getString ( R . string . github _ url _ om is ie 1 1 )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ github )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On Twitter Profile Chip _ browser Should Open () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Action ( Intent . ACTION _ VIEW ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Data ( app Resources . getString ( R . string . twitter _ url _ om is ie 1 1 )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ twitter )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On Website Chip _ browser Should Open () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Action ( Intent . ACTION _ VIEW ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Data ( app Resources . getString ( R . string . website _ url _ om is ie 1 1 )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ website _ om is ie 1 1 )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On Source Code Chip _ browser Should Open () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Action ( Intent . ACTION _ VIEW ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Data ( app Resources . getString ( R . string . source _ code _ url )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ source _ code )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On Api Chip _ browser Should Open () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Action ( Intent . ACTION _ VIEW ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhas Data ( app Resources . getString ( R . string . api _ url )) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ at tribution _ api )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclick On Libraries Chip _ list ShouldBe Present () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġall Of ( has Action ( Intent . ACTION _ VIEW )) ĊĠĠĠĠĠĠĠ ĠInt ents . int ending ( expected ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. respond With ( Instrumentation . Activity Result ( 0 , Ġnull )) ĊĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . about _ dest )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . chip _ used _ libs )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . re cyclerView _ libs )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( action On Item At Position < RecyclerView . ViewHolder >( 1 , Ġclick ())) ĊĊĠĠĠĠĠĠĠ ĠInt ents . int ended ( expected ) ĊĠĠĠ Ġ} Ċ } Ċ