Last active
March 27, 2023 08:45
-
-
Save aniketchanana/450ee523ef2796c7b736cf619941d506 to your computer and use it in GitHub Desktop.
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
describe('testing actions for todo application ', () => { | |
before(() => { | |
cy.visit('http://localhost:3000/'); | |
}) | |
it('test for typing todo in input box', () => { | |
const SAMPLE_TEXT = 'write article on medium.com'; | |
// enters text in input box of app | |
cy.get('input[name=task]') | |
.focus() | |
.clear() | |
.type(SAMPLE_TEXT) | |
.blur() | |
// click on add todo button in app | |
cy.get('button') | |
.click(); | |
// checking whether after adding todo it appears in DOM or not | |
cy.get('ul') | |
.contains('li', SAMPLE_TEXT) | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment