Skip to content

Instantly share code, notes, and snippets.

@angiejones
Created February 22, 2021 01:09
Show Gist options
  • Save angiejones/af9ad0771b31e3594f3e482c6f983679 to your computer and use it in GitHub Desktop.
Save angiejones/af9ad0771b31e3594f3e482c6f983679 to your computer and use it in GitHub Desktop.
Visual testing of completing task
@Test
public void testTaskComplete(){
List<String> tasks = List.of("do taxes", "pick up dinner");
tasks.forEach(screen::addItem);
screen.completeItem(tasks.get(0));
//Visual testing
Eyes eyes = new Eyes();
eyes.open(driver, "ToDo App", "complete task");
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