next.js/examples/with-cypress/cypress/e2e/pages.cy.ts
pages.cy.ts21 lines719 B
/* eslint-disable */
// Disable ESLint to prevent failing linting inside the Next.js repo.
// If you're using ESLint on your project, we recommend installing the ESLint Cypress plugin instead:
// https://github.com/cypress-io/eslint-plugin-cypress

describe("Navigation", () => {
  it("should navigate to the about page", () => {
    // Start from the index page
    cy.visit("http://localhost:3000/home");

    // Find a link with an href attribute containing "about" and click it
    cy.get('a[href*="about"]').click();

    // The new url should include "/home/about"
    cy.url().should("include", "/home/about");

    // The new page should contain an h1 with "About"
    cy.get("h1").contains("About");
  });
});
Quest for Codev2.0.0
/
SIGN IN