package Ġcom . nat ura . android . sample . screenshot tests Ċ Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġandroidx . test . rule . Activity Test Rule Ċ import Ġcom . nat ura . android . sample . R Ċ import Ġcom . nat ura . android . sample . components . AppBar Activity Ċ import Ġorg . junit . Ignore Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ @ Ignore Ċ class ĠApp Bar Activity Test Ġ: ĠScreen Shot Activity TestBase () Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġactivity Test Rule Ġ= ĠActivity Test Rule ( AppBar Activity :: class . java , Ġfalse , Ġfalse ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Snapshot _ With _ Search Expanded () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactivity Ġ= Ġactivity Test Rule . launch Activity ( null ) ĊĊĠĠĠĠĠĠĠ Ġcheck Screenshot ( activity , Ġ" default ") ĊĠĠĠĠĠĠĠ Ġperform Click ( R . id . search Menu Btn ) ĊĠĠĠĠĠĠĠ Ġcheck Screenshot ( activity , Ġ" search _ expanded ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Snapshot _ With _ Badge () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactivity Ġ= Ġactivity Test Rule . launch Activity ( null ) ĊĊĠĠĠĠĠĠĠ Ġcheck Screenshot ( activity , Ġ" app _ bar _ without _ badge ") ĊĠĠĠĠĠĠĠ Ġperform Click ( R . id . btn Increment ) ĊĠĠĠĠĠĠĠ Ġcheck Screenshot ( activity , Ġ" app _ bar _ with _ badge ") ĊĠĠĠ Ġ} Ċ } Ċ