package Ġcom . in structure . teacher . ui . pages Ċ Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Content Description Ċ import Ġcom . in structure . espress o . assert Displayed Ċ import Ġcom . in structure . espress o . assertNot Displayed Ċ import Ġcom . in structure . espress o . click Ċ import Ġcom . in structure . espress o . page .* Ċ import Ġcom . in structure . espress o . swipe Down Ċ import Ġorg . hamcrest . Matchers . all Of Ċ import Ġcom . in structure . teacher . R Ċ Ċ class ĠModules Page Ġ: ĠBase Page () Ġ{ ĊĊĠĠĠ Ġfun Ġassert Empty View () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of ( with Id ( R . id . module List Empty View ), Ġwith Ancestor ( R . id . module List ))). assert Displayed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġassert Module Is Un published () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . un published Icon )). assert Displayed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġassert Module Is Published () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . un published Icon )). assertNot Displayed () ĊĠĠĠĠĠĠĠ Ġon View ( with Id ( R . id . published Icon )). assert Displayed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġassert Module Is Present ( module Title : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of ( with Id ( R . id . moduleName ), Ġwith Text ( module Title ))). assert Displayed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġnavigate Back () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Parent ( R . id . toolbar ) Ġ+ Ġwith Content Description (" Navigate Ġup ")). click () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġrefresh () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of ( with Id ( R . id . swipe Refresh Layout ), Ġwith Ancestor ( R . id . module List ))). swipe Down () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġassert Module Item Is Present ( item Title : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( all Of ( with Id ( R . id . module Item Title ), Ġwith Text ( item Title ))). assert Displayed () ĊĠĠĠ Ġ} Ċ }