From e702fcc32ef399dc0f928973683d8fab5832a9c8 Mon Sep 17 00:00:00 2001 From: YuvanThirukumaran1 Date: Thu, 13 Jun 2024 21:53:57 -0600 Subject: [PATCH] Update viewinsight.cy.ts --- cypress/e2e/cv/viewinsight.cy.ts | 38 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/cypress/e2e/cv/viewinsight.cy.ts b/cypress/e2e/cv/viewinsight.cy.ts index fe3f94c..d518d02 100644 --- a/cypress/e2e/cv/viewinsight.cy.ts +++ b/cypress/e2e/cv/viewinsight.cy.ts @@ -1,23 +1,19 @@ -describe('View CV Insight', () => { - beforeEach(() => { - cy.visit('http://localhost:3000/cv_gallery'); - cy.get('input[type="email"]').type('juan.lebrija02@gmail.com'); - cy.get('input[type=password]').type('123'); - cy.get('form').submit(); - }); - - it('displays CVs and shows the dropdown for a selected CV', () => { - cy.get('.existing-cv').should('have.length.at.least', 1); - - cy.get('.existing-cv').first().within(() => { - cy.get('a').first().invoke('attr', 'href').then((href) => { - const roadmapUrl = `http://localhost:3000/${href}`; - cy.visit(roadmapUrl); - }); - }); +describe('View Insight', () => { + beforeEach(() => { + cy.visit('http://localhost:3000/cv_gallery'); + cy.get('input[type="email"]').type('yuvanuber1@gmail.com'); + cy.get('input[type=password]').type('123'); + cy.get('form').submit(); + }); + + it('opens Insight link', () => { + cy.get('.existing-cv').should('have.length.at.least', 1); + + cy.get('.existing-cv').first().within(() => { + cy.get('a').first().click(); // Click on the link to open the CV }); - }); - - export {}; - \ No newline at end of file + +}); + +export {};