Skip to content

Instantly share code, notes, and snippets.

@lydemann

lydemann/todo.po.ts

Created Jun 3, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.