Skip to content

Instantly share code, notes, and snippets.

@batmi02
Created October 8, 2019 20:50
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 batmi02/f5e0dada6d94e144d5daffbbc76abcf3 to your computer and use it in GitHub Desktop.
Save batmi02/f5e0dada6d94e144d5daffbbc76abcf3 to your computer and use it in GitHub Desktop.
it(‘should add a new todo to the list’, () => {
cy.visit(‘http://todomvc-app-for-testing.surge-sh/’)
cy.get(‘.new-todo’, {timeout: 6000}.type(“Clean room{enter}”)
cy.get(‘label’).should(‘have.text’, ‘Clean room’)
cy.get(‘.toggle’).should(‘not.be.checked’)
})
it(‘should mark a todo as completed’, () => {
cy.get(‘.toggle’).click()
cy.get(‘label’).should(‘have.text’, ‘text-decoration-line’, \
‘line-through’)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment