From f61b4a718a2ee31846deffcdd7c869d9d8ec62f6 Mon Sep 17 00:00:00 2001 From: BhJaipa <105307427+BhJaipal@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:55:34 +0530 Subject: [PATCH] Home Page and search page testing done --- frontend/cypress/e2e/snip-hub-test/start.cy.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/cypress/e2e/snip-hub-test/start.cy.js b/frontend/cypress/e2e/snip-hub-test/start.cy.js index 31437d8..fb0011d 100644 --- a/frontend/cypress/e2e/snip-hub-test/start.cy.js +++ b/frontend/cypress/e2e/snip-hub-test/start.cy.js @@ -13,4 +13,8 @@ describe('Start', () => { cy.get("input#search").type("hello").should("have.value", "hello"); cy.get("button#search-btn").click().location("href").should("contain", "http://localhost:3000/search/hello"); }) + it("Go to search page and come back", () => { + cy.get("input#search").type("hello{enter}").location("href").should("contain", "http://localhost:3000/search/hello"); + cy.get("button#go-back").click().location("pathname").should("eq", "/"); + }) }) \ No newline at end of file