package Ġcom . example . react n ativ ed id omi Ċ Ċ import Ġandroidx . test . ext . junit . rules . Activity Scenario Rule Ċ import Ġandroidx . test . filters . Large Test Ċ import Ġandroidx . test . internal . runner . junit 4 . Android JUnit 4 Class Runner Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ Ċ @ RunWith ( Android JUnit 4 Class Runner :: class ) Ċ @ Large Test Ċ class ĠUI Get ters Test : ĠBase UIT est () Ġ{ ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġactivity Rule : ĠActivity Scenario Rule < MainActivity > Ġ= ĠActivity Scenario Rule ( MainActivity :: class . java ) ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġinit () Ġ{ ĊĠĠĠĠĠĠĠ ĠwaitFor Sdk ToBe Ready () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Disabled Pur poses () Ġ{ ĊĠĠĠĠĠĠĠ Ġdis agree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Disabled Pur poses ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ P URPOSE _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Disabled Purpose Ids () Ġ{ ĊĠĠĠĠĠĠĠ Ġdis agree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Disabled Purpose Ids ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ P URPOSE _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Disabled V endors () Ġ{ ĊĠĠĠĠĠĠĠ Ġdis agree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Disabled V endors ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ VENDOR _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Disabled Vendor Ids () Ġ{ ĊĠĠĠĠĠĠĠ Ġdis agree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Disabled Vendor Ids ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ VENDOR _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Enabled Pur poses () Ġ{ ĊĠĠĠĠĠĠĠ Ġagree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Enabled Pur poses ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ P URPOSE _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Enabled Purpose Ids () Ġ{ ĊĠĠĠĠĠĠĠ Ġagree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Enabled Purpose Ids ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ P URPOSE _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Enabled V endors () Ġ{ ĊĠĠĠĠĠĠĠ Ġagree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Enabled V endors ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ VENDOR _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get Enabled Vendor Ids () Ġ{ ĊĠĠĠĠĠĠĠ Ġagree To All () ĊĊĠĠĠĠĠĠĠ Ġtap Button (" get Enabled Vendor Ids ") ĊĠĠĠĠĠĠĠ Ġassert Text ( ALL _ VENDOR _ IDS ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get JavaScript For WebView () Ġ{ ĊĠĠĠĠĠĠĠ Ġtap Button (" get JavaScript For WebView ") ĊĊĠĠĠĠĠĠĠ Ġ// ĠAssert ing Ġthe Ġwhole Ġstring Ġcan Ġbe Ġtricky Ġso Ġwe Ġjust Ġassert Ġthe Ġbeginning Ġof Ġit . ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġ"\" window . did omi On Ready Ġ= Ġwindow . did omi On Ready Ġ|| Ġ[]; window . did omi On Ready . push ( function Ġ( Did omi ) Ġ{ ". trim () ĊĊĠĠĠĠĠĠĠ Ġ// ĠThere Ġmight Ġbe Ġa Ġdelay Ġto Ġget Ġthis Ġstring . ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 1 _ 0 0 0 L ) ĊĠĠĠĠĠĠĠ Ġassert Text StartsWith ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ Get QueryString For WebView () Ġ{ ĊĠĠĠĠĠĠĠ Ġtap Button (" get QueryString For WebView ") ĊĊĠĠĠĠĠĠĠ Ġ// ĠAssert ing Ġthe Ġwhole Ġstring Ġcan Ġbe Ġtricky Ġso Ġwe Ġjust Ġassert Ġthe Ġbeginning Ġof Ġit . ĊĠĠĠĠĠĠĠ Ġval Ġexpected Ġ= Ġ"\" did omi Config . user . external Consent . value ". trim () ĊĊĠĠĠĠĠĠĠ Ġ// ĠThere Ġmight Ġbe Ġa Ġdelay Ġto Ġget Ġthis Ġstring . ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 1 _ 0 0 0 L ) ĊĠĠĠĠĠĠĠ Ġassert Text StartsWith ( expected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ getUser Status () Ġ{ ĊĠĠĠĠĠĠĠ Ġtap Button (" getUser Status ") ĊĊĠĠĠĠĠĠĠ Ġ// ĠAssert ing Ġthe Ġwhole Ġstring Ġcan Ġbe Ġtricky Ġso Ġwe Ġjust Ġassert Ġthe Ġbeginning Ġof Ġit . ĊĠĠĠĠĠĠĠ Ġval Ġexpected 1 Ġ= Ġ"\" add tl _ consent \":\" \"" . trim () ĊĠĠĠĠĠĠĠ Ġval Ġexpected 2 Ġ= Ġ"\" consent _ string \":\" \"" . trim () ĊĠĠĠĠĠĠĠ Ġval Ġexpected 3 Ġ= Ġ"\" user _ id \": ". trim () ĊĠĠĠĠĠĠĠ Ġval Ġexpected 4 Ġ= Ġ"\" vendors \":\" { ". trim () ĊĠĠĠĠĠĠĠ Ġval Ġexpected 5 Ġ= Ġ"\" pur poses \":\" { ". trim () ĊĊĠĠĠĠĠĠĠ Ġ// ĠThere Ġmight Ġbe Ġa Ġdelay Ġto Ġget Ġthis Ġstring . ĊĠĠĠĠĠĠĠ ĠThread . sleep ( 1 _ 0 0 0 L ) ĊĊĠĠĠĠĠĠĠ Ġassert Text Contains ( expected 1 ) ĊĠĠĠĠĠĠĠ Ġassert Text Contains ( expected 2 ) ĊĠĠĠĠĠĠĠ Ġassert Text Contains ( expected 3 ) ĊĠĠĠĠĠĠĠ Ġassert Text Contains ( expected 4 ) ĊĠĠĠĠĠĠĠ Ġassert Text Contains ( expected 5 ) ĊĠĠĠ Ġ} Ċ } Ċ