From 41f385f50bd9bc4c4fa1a3a429c2b52e1003f703 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 24 Apr 2026 10:23:11 +0300 Subject: [PATCH] test cancel button hides modal --- cypress/e2e/homeCreatePlan.cy.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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') + }) })