Testing the code file

pull/171/head
Hammad1007 2 years ago
parent a859189dfe
commit 2a7855f9e8

@ -94,6 +94,23 @@ describe('Project: Notes-App', () => {
cy.get('.note textarea').should('be.visible') cy.get('.note textarea').should('be.visible')
}) })
}) })
context('Delete the note button', () => {
it('The button is visible', () => {
cy.get('.delete').should('be.visible')
})
it('The button is clickable', () => {
cy.get('.delete').should('be.visible').click()
})
it('The button when clicked deletes the note from the screen', () => {
cy.get('.note').its('length').then((initialNoteCount) => {
cy.get('.note:first-of-type .delete').click()
cy.get('.note').should('have.length', initialNoteCount - 1)
})
})
})
}) })
}) })
}) })

Loading…
Cancel
Save