Skip to content

Instantly share code, notes, and snippets.

@angiejones
Created February 22, 2021 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angiejones/791b02cbf39d6d042722c4b6ac4a8ffa to your computer and use it in GitHub Desktop.
Save angiejones/791b02cbf39d6d042722c4b6ac4a8ffa to your computer and use it in GitHub Desktop.
Visual testing to verify text displayed correctly
@Test
public void testAddLongTasks(){
List<String> tasks = List.of(
"buy a flight from UK to India. then buy a flight from India to US",
"take my imaginary kid to soccer practice. dont forget to buy snacks",
"check out cool new testing conference and submit abstract for a great talk!"
);
tasks.forEach(screen::addItem);
//Visual testing
Eyes eyes = new Eyes();
eyes.open(driver, "ToDo App", "long tasks");
eyes.check(Target.window().ignore(screen.getStatusBarLocator())); //status bar is dynamic. let's ignore
eyes.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment