Skip to content

Instantly share code, notes, and snippets.

@angiejones
Created Feb 22, 2021
Embed
What would you like to do?
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