Skip to content

Instantly share code, notes, and snippets.

@lydemann lydemann/todo.po.ts
Created Jul 3, 2019

Embed
What would you like to do?
todo.po.ts
export class TodoPage {
public static interceptTodoListRequest(todoList: any[]) {
cy.server();
cy.route('http://localhost:8080/api/todo-list', todoList);
}
public static goToPage() {
cy.visit('/');
}
public static checkForTodos(todoList: any[]) {
todoList.forEach(todo => {
cy.contains(todo.title);
cy.get('.e2e-todoitem')
.first()
.click();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.