Skip to content

Commit

Permalink
[ADD]:Test for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
ABHISHEK-PANDEY2 committed Aug 26, 2023
1 parent 0008a8d commit ba0c21b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cypress/e2e/components/homepage/homepage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe("Home Page Test | CodeLabz", () => {
});

it("check New Codelabz Button is working", function () {
cy.wait(5000);
cy.get("[data-testId=NewCodelabzBtn]").should("exist").click();
cy.get("[data-testId=newTutorial_title]").should("exist").type("test");
cy.get("[data-testId=newTutorial_summary]").should("exist").type("test");
Expand All @@ -57,7 +58,7 @@ describe("Home Page Test | CodeLabz", () => {
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}`);
expect(loc.href).to.eq(`${this.base_url}tutorial/${id}`);
});
});
});

0 comments on commit ba0c21b

Please sign in to comment.