Created
July 3, 2019 06:14
-
-
Save lydemann/1a9bd63d1cd72100e10a4c95f70a9c30 to your computer and use it in GitHub Desktop.
todo.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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