package Ġorg . od k . collect . android . feature . for ment ry Ċ Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . rules . Rule Chain Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . od k . collect . android . R Ċ import Ġorg . od k . collect . android . support . Collect Test Rule Ċ import Ġorg . od k . collect . android . support . Test Rule Chain Ċ import Ġorg . od k . collect . android . support . pages . MainMenu Page Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ class ĠCatch Form Design Exceptions Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġrule Ġ= ĠCollect Test Rule () ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġrule Chain : ĠRule Chain Ġ= ĠTest Rule Chain . chain (). around ( rule ) ĊĊĠĠĠ Ġ@ Test Ġ// Ġhttps :// github . com / get od k / collect / issues / 4 7 5 0 ĊĠĠĠ Ġfun Ġwhen Form Has Design Errors _ explanation Dialog ShouldBe Displayed And The Form ShouldBe Closed () Ġ{ ĊĠĠĠĠĠĠĠ Ġrule . start At MainMenu () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. copy Form (" form _ design _ error . xml ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. click Fill Blank Form () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. click On Form (" Re levance Ġand Ġcalculate Ġloop ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. answer Question ( 1 , Ġ" B ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. scrollTo And Assert Text (" third ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. answer Question ( 2 , Ġ" C ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠAnswer ing ĠC Ġabove Ġtriggers Ġa Ġre computation Ġround Ġwhich Ġresets ĠfullName Ġto Ġname . ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠThey 're Ġthen Ġequal Ġwhich Ġmakes Ġthe Ġthird Ġquestion Ġnon - relevant . ĠTrying Ġto Ġchange Ġthe ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// Ġvalue Ġof Ġa Ġnon - relevant Ġnode Ġthrows Ġan Ġexception . ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. answer Question ( 2 , Ġ" D ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. assert Text ( R . string . update _ widgets _ error ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. click OK On Dialog () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. assert On Page ( MainMenu Page ()) ĊĠĠĠ Ġ} Ċ } Ċ