import { ErrorCode } from "@batch-cooking/shared"; describe("smoke test", () => { it("redirects an unauthenticated visitor to the login page", () => { cy.intercept("GET", "**/auth/me", { statusCode: 401, body: { code: ErrorCode.NOT_AUTHENTICATED, message: "Not authenticated" }, }); cy.visit("/"); cy.url().should("include", "/login"); cy.contains("h1", "Se connecter").should("be.visible"); }); });