package Ġde . apps factory . cock tail Ċ Ċ import Ġandroidx . test . espress o . Esp ress o Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . Esp ress o . press Back Ċ import Ġandroidx . test . espress o . action . View Actions Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġandroidx . test . filters . Large Test Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġcom . az im ol abs . condition watcher . Condition Watcher Ċ import Ġde . apps factory . cock tail . login . Login Activity Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test ĊĊ Ċ @ Large Test Ċ class ĠMain Screen Test Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġactivity Rule Ġ= ĠActivity Test Rule ( Login Activity :: class . java ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġhigh Level Navigation () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Login Ġscreen ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . email EditText )). perform ( View Actions . type Text ( Const . EMAIL )) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . password EditText )). perform ( View Actions . type Text ( Const . PASSWORD )) ĊĠĠĠĠĠĠĠ ĠE sp ress o . close Soft Keyboard () ĊĊĠĠĠĠĠĠĠ Ġ// open Main Screen ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . login Button )). perform ( click ()) ĊĊĠĠĠĠĠĠĠ ĠCondition Watcher . set Watch Interval ( 1 0 0 0 ) ĊĠĠĠĠĠĠĠ ĠCondition Watcher . waitFor Condition ( Items Loaded ()) ĊĊĠĠĠĠĠĠĠ Ġ// categories Ġloaded ĊĠĠĠĠĠĠĠ Ġmake Screenshot (" high Level Navigation _ categories ") ĊĊĠĠĠĠĠĠĠ Ġ// go Ġto Ġingredients ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . bottom _ nav _ ingredients )). perform ( click ()) ĊĠĠĠĠĠĠĠ ĠCondition Watcher . waitFor Condition ( Items Loaded ()) ĊĠĠĠĠĠĠĠ Ġmake Screenshot (" high Level Navigation _ ingredients _ 1 ") ĊĊĠĠĠĠĠĠĠ Ġ// go Ġto Ġfavor ites ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . bottom _ nav _ favorites )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġ// favorites Ġstored Ġlocally , Ġso Ġwill Ġbe Ġloaded Ġpretty Ġfast ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 5 0 0 ) ĊĠĠĠĠĠĠĠ Ġmake Screenshot (" high Level Navigation _ favorites ") ĊĊĠĠĠĠĠĠĠ Ġ// should Ġopen Ġalready Ġloaded Ġingredients ĊĠĠĠĠĠĠĠ Ġpress Back () ĊĠĠĠĠĠĠĠ Ġmake Screenshot (" high Level Navigation _ ingredients _ 2 ") ĊĊĠĠĠĠĠĠĠ Ġ// should Ġopen Ġalready Ġloaded Ġcategories ĊĠĠĠĠĠĠĠ Ġpress Back () ĊĠĠĠĠĠĠĠ Ġmake Screenshot (" high Level Navigation _ categories _ 2 ") ĊĠĠĠ Ġ} Ċ }