Created
June 3, 2020 15:23
-
-
Save lydemann/5a2377792aa521f561a5d641c9df09ab 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 goToPage() { | |
cy.visit('/'); | |
} | |
public static createTodoItem() { | |
cy.get('[data-test=todo-title]').type('Some name'); | |
cy.get('[data-test=todo-description]').type('Some description'); | |
cy.get('[data-test=todo-duedate]').type('2019-10-10'); | |
cy.get('[data-test=create-todo-submit]').click(); | |
cy.get('[data-test=todo-item]').should('have.length', 6); | |
} | |
public static checkForTodos() { | |
cy.get('[data-test=todo-item]').should('have.length', 5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment