diff --git a/cypress/e2e/homeCreatePlan.cy.js b/cypress/e2e/homeCreatePlan.cy.js index e501984..575b4ce 100644 --- a/cypress/e2e/homeCreatePlan.cy.js +++ b/cypress/e2e/homeCreatePlan.cy.js @@ -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') + }) })