file - Android espresso compare strings on the screen with string from assets -
i compare content of .txt file have in assets folder text on screen.
usually when assert text on screen use: onview(withid(r.id.someid)).check(matches(withtext("string")));
is ther easy way can assert file?
also, if want shorten assertions , actions when using expresso, check library: https://github.com/schibstedspain/barista (disclaimer: i'm contributor).
it contains set of quick actions , assertions make tests more readable.
Comments
Post a Comment