test cancel button hides modal

This commit is contained in:
Yisroel Baum 2026-04-24 10:23:11 +03:00
parent b50413f7c9
commit 41f385f50b
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -37,4 +37,12 @@ describe('Create plan modal on the home page', () => {
cy.get('#create-plan-modal button.save-plan').should('be.visible')
cy.get('#create-plan-modal button.cancel-plan').should('be.visible')
})
it('hides the modal when clicking "Cancel"', () => {
cy.get('#texts-list li').first()
.find('button.create-plan').click()
cy.get('#create-plan-modal').should('be.visible')
cy.get('#create-plan-modal button.cancel-plan').click()
cy.get('#create-plan-modal').should('not.be.visible')
})
})