Skip to content

Instantly share code, notes, and snippets.

@angiejones
Created February 22, 2021 00:23
Show Gist options
  • Save angiejones/9087409345f1a2ca4c76cb2a51a288ee to your computer and use it in GitHub Desktop.
Save angiejones/9087409345f1a2ca4c76cb2a51a288ee to your computer and use it in GitHub Desktop.
Visual testing covers functional assertions
@Test
public void testAddTasksInDifferentCategories(){
screen.addItem("fix bug", TasksScreen.TaskColor.PURPLE);
screen.addItem("wash car", TasksScreen.TaskColor.YELLOW);
screen.addItem("grocery shopping", TasksScreen.TaskColor.BLUE);
screen.addItem("get nails done", TasksScreen.TaskColor.PINK);
//Visual testing
Eyes eyes = new Eyes();
eyes.open(driver, "ToDo App", "colored 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