Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created June 3, 2020 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lydemann/5a2377792aa521f561a5d641c9df09ab to your computer and use it in GitHub Desktop.
Save lydemann/5a2377792aa521f561a5d641c9df09ab to your computer and use it in GitHub Desktop.
todo.po.ts
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