package Ġcom . radix d lt . android . apps . wallet . fragment Ċ Ċ import Ġandroidx . test . espress o . Esp ress o Ċ import Ġandroidx . test . espress o . Id ling Registry Ċ 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 . Small Test Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġcom . radix d lt . android . apps . wallet . R Ċ import Ġcom . radix d lt . android . apps . wallet . bio metrics . Bio metrics Checker Ċ import Ġcom . radix d lt . android . apps . wallet . helper . Delay Helper Ċ import Ġcom . radix d lt . android . apps . wallet . helper . click On Ċ import Ġcom . radix d lt . android . apps . wallet . helper . navigation Icon Matcher Ċ import Ġcom . radix d lt . android . apps . wallet . ui . start . Start Activity Ċ import Ġcom . radix d lt . android . apps . wallet . util . copy To Clipboard Ċ import Ġcom . sch ib st ed . sp ain . bar ista . assertion . Bar ista Enabled Assertions Ċ import Ġcom . sch ib st ed . sp ain . bar ista . assertion . Bar ista Visibility Assertions . assert Displayed Ċ import Ġcom . sch ib st ed . sp ain . bar ista . interaction . Bar ista Click Interactions . click On Ċ import Ġcom . sch ib st ed . sp ain . bar ista . interaction . Bar ista List Interactions . click ListItem Ċ import Ġcom . sch ib st ed . sp ain . bar ista . rule . clear data . Clear Database Rule Ċ import Ġcom . sch ib st ed . sp ain . bar ista . rule . clear data . Clear Files Rule Ċ import Ġcom . sch ib st ed . sp ain . bar ista . rule . clear data . Clear Preferences Rule Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ /** Ċ Ġ* ĠInstrument ed Ġtest , Ġwhich Ġwill Ġexecute Ġon Ġan ĠAndroid Ġdevice . Ċ Ġ* Ċ Ġ* ĠSee Ġ[ testing Ġdocumentation ]( http :// d . android . com / tools / testing ). Ċ Ġ*/ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ @ Small Test Ċ class ĠAsset Transactions Fragment Test Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* Ġ[ Activity Test Rule ] Ġis Ġa ĠJ Unit Ġ[@ Rule ][ Rule ] Ġto Ġlaunch Ġyour Ġactivity Ġunder Ġtest . ĊĠĠĠĠ Ġ* ĊĠĠĠĠ Ġ* ĠRules Ġare Ġintercept ors Ġwhich Ġare Ġexecuted Ġfor Ġeach Ġtest Ġmethod Ġand Ġare Ġimportant Ġbuilding ĊĠĠĠĠ Ġ* Ġblocks Ġof ĠJ unit Ġtests . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġactivity Scenario Rule Ġ= Ġactivity Scenario Rule < Start Activity >() ĊĊĠĠĠ Ġ// ĠClear Ġall Ġapp 's ĠSharedPreferences ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġclear Preferences Rule Ġ= ĠClear Preferences Rule () ĊĊĠĠĠ Ġ// ĠDelete Ġall Ġtables Ġfrom Ġall Ġthe Ġapp 's ĠSQLite ĠDatabase s ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġclear Database Rule Ġ= ĠClear Database Rule () ĊĊĠĠĠ Ġ// ĠDelete Ġall Ġfiles Ġin Ġget Files Dir () Ġand Ġget Cache Dir () ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġclear Files Rule Ġ= ĠClear Files Rule () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Asset Transactions Details Are Displayed () Ġ{ ĊĠĠĠĠĠĠĠ Ġimport Wallet () ĊĠĠĠĠĠĠĠ Ġset Pin () ĊĠĠĠĠĠĠĠ Ġcheck Bio metrics () ĊĊĠĠĠĠĠĠĠ Ġ// ĠClick Ġon Ġx Ġon Ġthe Ġtoolbar Ġto Ġdismiss ĊĠĠĠĠĠĠĠ Ġclick On ( navigation Icon Matcher ()) ĊĊĠĠĠĠĠĠĠ Ġclick ListItem ( R . id . assets RecyclerView , Ġ 0 ) ĊĊĠĠĠĠĠĠĠ Ġclick On ( R . id . pull Down Drop Frame Layout ) ĊĊĠĠĠĠĠĠĠ Ġassert Displayed ( R . string . asset _ transactions _ fragment _ xml _ asset _ r ri ) ĊĊĠĠĠĠĠĠĠ ĠDelay Helper . wait Time ( TimeUnit . SECONDS . to Millis ( 3 )) ĊĊĠĠĠĠĠĠĠ Ġclick On ( R . id . pull Down Drop Frame Layout ) ĊĊĠĠĠĠĠĠĠ Ġassert Displayed ( R . string . asset _ transactions _ fragment _ xml _ your _ balance _ title ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠClean Ġup ĊĠĠĠĠĠĠĠ ĠId ling Registry . getInstance (). unregister ( Delay Helper . id ling Resource ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġimport Wallet () Ġ{ ĊĠĠĠĠĠĠĠ ĠE sp ress o . on View ( View Matchers . with Id ( R . id . greeting Terms And Conditions CheckBox )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( G reeting Fragment Test . click In ( 0 , Ġ 0 )) ĊĠĠĠĠĠĠĠ ĠE sp ress o . on View ( View Matchers . with Id ( R . id . greeting Privacy Policy CheckBox )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( G reeting Fragment Test . click In ( 0 , Ġ 0 )) ĊĠĠĠĠĠĠĠ ĠBar ista Enabled Assertions . assert Enabled ( R . id . greeting Get Started Button ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . greeting Get Started Button ) ĊĠĠĠĠĠĠĠ Ġassert Displayed ( R . string . create _ wallet _ fragment _ welcome _ title _ xml ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . create Wallet Import Wallet Button ) ĊĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠInstrument ation Registry . get Instrumentation (). target Context ĊĠĠĠĠĠĠĠ Ġval Ġmnemonic Ġ= Ġ" d ance Ġtax i Ġnature Ġaccount Ġnur se Ġsplit Ġpicture Ġw age Ġframe Ġpromote Ġfluid Ġreason " ĊĊĠĠĠĠĠĠĠ Ġ// ĠMakes Ġsure Ġthat Ġcopying Ġhappens Ġon Ġthe Ġcorrect Ġthread Ġwhen Ġtesting ĊĠĠĠĠĠĠĠ ĠInstrument ation Registry . get Instrumentation (). run On Main Sync Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcopy To Clipboard ( context , Ġmnemonic ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġclick On ( R . id . restore Wallet Paste Image Button ) ĊĊĠĠĠĠĠĠĠ Ġclick On ( R . id . restore Wallet Confirm Button ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġset Pin () Ġ{ ĊĠĠĠĠĠĠĠ Ġassert Displayed ( R . string . setup _ pin _ dialog _ set _ pin _ header ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . one ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . two ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . three ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . four ) ĊĊĠĠĠĠĠĠĠ Ġassert Displayed ( R . string . setup _ pin _ dialog _ confirm _ pin _ header ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . one ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . two ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . three ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . four ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġcheck Bio metrics () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= ĠInstrument ation Registry . get Instrumentation (). target Context ĊĠĠĠĠĠĠĠ Ġif Ġ( Bio metrics Checker . getInstance ( context ). is Using Bio metrics ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclick On ( R . id . setup Bio metrics Not Right Now Button ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ