From 4b1a6bdd075d15331bcbf9d77828f87b9e5ec5e5 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Sun, 27 Aug 2023 00:16:10 +0530 Subject: [PATCH] [FIX]:Test for homepage --- cypress/e2e/components/homepage/homepage.cy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/components/homepage/homepage.cy.js b/cypress/e2e/components/homepage/homepage.cy.js index dfacae2f..47bda8fc 100644 --- a/cypress/e2e/components/homepage/homepage.cy.js +++ b/cypress/e2e/components/homepage/homepage.cy.js @@ -55,10 +55,10 @@ describe("Home Page Test | CodeLabz", () => { it("Check New Codelabz is visible on homepage", function () { cy.visit(this.base_url); cy.get("[data-testId=codelabz]").should("exist"); - cy.get("[data-testId=codelabzDetails]").should("exist").click(); - cy.wait(5000); - cy.location().should(loc => { - expect(loc.href).to.eq(`${this.base_url}tutorial/${id}`); + cy.get("[data-testId=codelabzDetails]").spread((first, second) => { + first.click(); + cy.wait(5000); + cy.url().should("include", "/tutorial"); }); }); });