package Ġdev . ale j and ror os as . ap pt emplate Ċ Ċ import Ġandroidx . compose . ui . test . assertIs Displayed Ċ import Ġandroidx . compose . ui . test . assert Text Equals Ċ import Ġandroidx . compose . ui . test . junit 4 . create Android Compose Rule Ċ import Ġandroidx . compose . ui . test . on Node With Tag Ċ import Ġandroidx . compose . ui . test . on Node With Text Ċ import Ġandroidx . compose . ui . test . perform Click Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠNavigation Test Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġcompose Test Rule Ġ= Ġcreate Android Compose Rule < MainActivity >() ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġuse AppContext () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġapp Context Ġ= ĠInstrument ation Registry . get Instrumentation (). target Context ĊĠĠĠĠĠĠĠ ĠassertEquals (" dev . ale j and ror os as . ap pt emplate ", Ġapp Context . packageName ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Navigation () Ġ{ ĊĠĠĠĠĠĠĠ Ġcompose Test Rule . on Node With Text (" Navigate Ġto ĠFeature "). perform Click () ĊĊĠĠĠĠĠĠĠ Ġcompose Test Rule . on Node With Tag (" Feature Template Text "). assert Text Equals (" FAB Ġhas Ġbeen Ġclicked Ġ 5 Ġtimes ") ĊĊĠĠĠĠĠĠĠ Ġcompose Test Rule . on Node With Tag (" Feature Template Back "). perform Click () ĊĊĠĠĠĠĠĠĠ Ġcompose Test Rule . on Node With Text (" Navigate Ġto ĠFeature "). assertIs Displayed () ĊĠĠĠ Ġ} Ċ } Ċ