Skip to content

Instantly share code, notes, and snippets.

@giltayar
Created October 5, 2018 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save giltayar/8017a772c13b84d246298d448a6a7d4f to your computer and use it in GitHub Desktop.
Save giltayar/8017a772c13b84d246298d448a6a7d4f to your computer and use it in GitHub Desktop.
'use strict'
describe(`TodoMVC using Cypress`, function () {
it('can add todos and then delete them', () => {
cy.visit('http://todomvc.com/examples/react/#/')
cy.get('.new-todo').type('Cook dinner{enter}')
cy.get('.view > label').should('have.text', 'Cook dinner')
cy.get('.new-todo').type('Clean house{enter}').then(() => {debugger})
cy.get('.view > label').eq(1).should('have.text', 'Clean house')
cy.get('.toggle').eq(1).click()
cy.contains('1 item left').should('exist')
cy.contains('Clear completed')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment