package Ġchat . rocket . android . chat room . ui Ċ Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . No Matching View Exception Ċ import Ġandroidx . test . espress o . action . View Actions .* Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . contrib . RecyclerView Actions Ċ import Ġandroidx . test . espress o . matcher . View Matchers .* Ċ import Ġandroidx . test . filters . Large Test Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġchat . rocket . android . R Ċ import Ġchat . rocket . android . analytics . event . Screen View Event Ċ import Ġchat . rocket . android . authentication . ui . Authentication Activity Ċ import Ġchat . rocket . android . util . Scroll To Top Ċ import Ġchat . rocket . android . util . Toast Matcher . Companion . is Toast Ċ import Ġchat . rocket . android . util . click Child View With Id Ċ import Ġchat . rocket . android . util . extensions . add Fragment Back Stack Ċ import Ġchat . rocket . android . util . login User To The App Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġtest Config . Config . Companion . SERVER _ URL Ċ import Ġtest Config . Config . Companion . TEST _ CHANNEL 2 Ċ import Ġtest Config . Config . Companion . TEST _ MESSAGE Ċ import Ġtest Config . Config . Companion . TEST _ USER Ċ import Ġtest Config . Config . Companion . TEST _ USER 2 Ċ Ċ @ Large Test Ċ class ĠChat Room Fragment Test Ġ{ ĊĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġvar Ġactivity Rule Ġ= ĠActivity Test Rule ( Authentication Activity :: class . java , Ġtrue , Ġtrue ) ĊĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġfun Ġrule () Ġ= Ġactivity Rule ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrule (). activity . add Fragment Back Stack ( Screen View Event . Login . screen Name , ĠR . id . fragment _ container ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġchat . rocket . android . authentication . login . ui . newInstance ( SERVER _ URL ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogin User To The App () ĊĠĠĠĠĠĠĠ Ġ} Ġcatch Ġ( e : ĠNo Matching View Exception ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠThread . sleep ( 3 0 0 0 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcheck _ UI _ elements _ when _ messages _ are _ present () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing Channel () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . message _ list _ container )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . layout _ message _ list )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . layout _ message _ composer )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcheck _ UI _ elements _ when _ no _ messages _ is _ present () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 1 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . layout _ message _ list )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . message _ list _ container )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . layout _ message _ composer )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . image _ chat _ icon )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ chat _ title )). check ( matches ( with Text ( R . string . msg _ no _ chat _ title ))) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ chat _ description )). check ( matches ( with Text ( R . string . msg _ no _ chat _ description ))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcheck _ UI _ elements _ of _ message _ composer () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing Channel () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ add _ reaction _ or _ show _ keyboard )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ message )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ show _ attachment _ options )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcheck _ UI _ elements _ of _ message _ item () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . message _ list _ container )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . image _ avatar )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ sender )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ message _ time )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ content )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ content )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshow _ attachment _ options () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing Channel () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ show _ attachment _ options )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ take _ a _ photo )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ attach _ a _ file )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ drawing )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ message )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġsend _ text _ message () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing Channel () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ message )). check ( matches ( with Hint ( R . string . msg _ message ))) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype Text ( TEST _ MESSAGE ), Ġclose Soft Keyboard () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . button _ send )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . text _ message )). perform ( clear Text ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcheck _ message _ action _ bottom _ sheet () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView Actions . action On Item At Position < RecyclerView . ViewHolder >( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 , Ġclick () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ add _ reaction )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ reply )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ quote )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ permalink )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ copy )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ edit )). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ info )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġemoji _ picker _ popup _ should _ display () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView Actions . action On Item At Position < RecyclerView . ViewHolder >( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 , Ġclick () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ add _ reaction )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . picker _ container )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcopy _ the _ message () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView Actions . action On Item At Position < RecyclerView . ViewHolder >( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 , Ġclick () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ copy )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . msg _ message _ copied )). in Root ( is Toast ()). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcopy _ the _ permalink () Ġ{ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView Actions . action On Item At Position < RecyclerView . ViewHolder >( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 , Ġclick () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . action _ msg _ permalink )). perform ( click ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( R . string . msg _ permalink _ copied )). in Root ( is Toast ()). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġclicking _ user _ avatar _ should _ open _ his _ details (){ ĊĠĠĠĠĠĠĠ Ġnavigate To Existing User 2 () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( Scroll To Top ()) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . recycler _ view )). perform ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRecyclerView Actions . action On Item At Position < RecyclerView . ViewHolder >( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ 0 , Ġclick Child View With Id ( R . id . image _ avatar ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . user _ details _ layout )). check ( matches ( is Displayed ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġnavigate To Existing Channel () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( TEST _ CHANNEL 2 )). perform ( click ()) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 2 0 0 0 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġnavigate To Existing User 1 () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( TEST _ USER )). perform ( click ()) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 2 0 0 0 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġnavigate To Existing User 2 () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Text ( TEST _ USER 2 )). perform ( click ()) ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 2 0 0 0 ) ĊĠĠĠ Ġ} Ċ }