package Ġcom . ches ire . mal ime . view . search Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . action . View Actions . press I me ActionButton Ċ import Ġandroidx . test . espress o . action . View Actions . type Text Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . matcher . Root Matchers . is Platform Popup Ċ import Ġandroidx . test . espress o . matcher . View Matchers . is Displayed Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Id Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Text Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġandroidx . test . runner . Android JUnit 4 Ċ import Ġcom . ches ire . mal ime . INVALID _ SEARCH _ ADD _ TITLE Ċ import Ġcom . ches ire . mal ime . R Ċ import Ġcom . ches ire . mal ime . VALID _ SEARCH _ ADD _ TITLE Ċ import Ġcom . ches ire . mal ime . VALID _ SEARCH _ SINGLE _ ITEM Ċ import Ġcom . ches ire . mal ime . core . api . Library Api Ċ import Ġcom . ches ire . mal ime . core . api . Search Api Ċ import Ġcom . ches ire . mal ime . core . flags . ItemType Ċ import Ġcom . ches ire . mal ime . get Mal ime Model Ċ import Ġcom . ches ire . mal ime . injection . espress o D agger Mock Rule Ċ import Ġcom . ches ire . mal ime . tools . Toast Matcher . Companion . on Toast Ċ import Ġcom . ches ire . mal ime . view . MainActivity Ċ import Ġcom . sch ib st ed . sp ain . bar ista . assertion . Bar ista Visibility Assertions . assert NotExist Ċ 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 Child Ċ import Ġcom . sch ib st ed . sp ain . bar ista . interaction . Bar ista RadioButton Interactions . click RadioButton Item Ċ import Ġcom . sch ib st ed . sp ain . bar ista . interaction . Bar ista Sleep Interactions . sleep Ċ import Ġio . reactivex . Single Ċ import Ġorg . junit . Ignore Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito .` when ` Ċ import Ġjava . util . Locale Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠSearch Adding Tests Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġdagger Rule Ġ= Ġes press o D agger Mock Rule () ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġactivity Rule Ġ= ĠActivity Test Rule ( MainActivity :: class . java , Ġfalse , Ġfalse ) ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġsearch Api : ĠSearch Api ĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġlibrary Api : ĠLibrary Api ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġsort Option Should Not Be Available () Ġ{ ĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġassert NotExist ( R . id . menu Options Sort ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfilter Option Should Not Be Available () Ġ{ ĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġassert NotExist ( R . id . menu Options Filter ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfailure ToAdd An ime Produces Error () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠINVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . error Ġ{ ĠThrowable (" failure ToAdd An ime Produces Error ") Ġ}) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ completed )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ failed ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠINVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġfailure ToAdd M anga Produces Error () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠINVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . error Ġ{ ĠThrowable (" failure ToAdd M anga Produces Error ") Ġ}) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ completed )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ failed ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠINVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add An ime Item With Completed Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ completed )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add An ime Item With Current Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ current )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add An ime Item With Dropped Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ d ropped )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add An ime Item With On Hold Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ on _ hold )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add An ime Item With Pl anned Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . An ime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option An ime Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ pl anned )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add M anga Item With Completed Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ completed )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add M anga Item With Current Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ current )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add M anga Item With Dropped Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ d ropped )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add M anga Item With On Hold Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ on _ hold )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcan Add M anga Item With Pl anned Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġget Mal ime Model ( 0 , Ġtitle Ġ= ĠVALID _ SEARCH _ ADD _ TITLE ) ĊĠĠĠĠĠĠĠ Ġ` when `( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Api . search For Series With ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ SINGLE _ ITEM , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠItem Type . M anga ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). thenReturn ( Single . just ( listOf ( model ))) ĊĠĠĠĠĠĠĠ Ġ` when `( library Api . addItem ( model )). thenReturn ( Single . just ( model )) ĊĊĠĠĠĠĠĠĠ Ġactivity Rule . launch Activity ( null ) ĊĠĠĠĠĠĠĠ Ġclick On ( R . id . menu Main Navigation Search ) ĊĠĠĠĠĠĠĠ Ġclick RadioButton Item ( R . id . fragment Search Option Choices , ĠR . id . fragment Search Option M anga Choice ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . fragment Search Search EditText )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( VALID _ SEARCH _ SINGLE _ ITEM ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpress I me ActionButton () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġsleep ( 1 0 0 ) ĊĠĠĠĠĠĠĠ Ġclick ListItem Child ( R . id . fragment Search RecyclerView , Ġ 0 , ĠR . id . adapter Item Search Add Image ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . filter _ state _ pl anned )). in Root ( is Platform Popup ()). perform ( click ()) ĊĊĠĠĠĠĠĠĠ Ġon Toast ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠString . format ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLocale . ROOT , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġactivity Rule . activity . getString ( R . string . search _ add _ success ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠVALID _ SEARCH _ ADD _ TITLE ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Ignore (" Couldn 't Ġfind Ġanything Ġthat Ġsays Ġhow Ġthis Ġcould Ġbe Ġtested , Ġwill Ġneed Ġto Ġat Ġsome Ġpoint ") ĊĠĠĠ Ġfun Ġcan Launch Series Profile () Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// ĠNeed Ġto Ġadd Ġtest Ġfor Ġmaking Ġsure Ġcan 't Ġadd Ġmultiple Ġtimes Ċ } Ċ