import { ErrorCode } from "@batch-cooking/shared"; describe("smoke test", () => { it("redirects an unauthenticated visitor away from a guarded page to the login page", () => { cy.intercept("GET", "**/auth/me", { statusCode: 401, body: { code: ErrorCode.NOT_AUTHENTICATED, message: "Not authenticated" }, }); // `/` itself now shows the public landing page to a logged-out visitor // (see landing.feature / issue #41) — every *other* guarded route still // bounces straight to /login, which is what this smoke check covers. cy.visit("/recettes"); cy.url().should("include", "/login"); cy.contains("h1", "Se connecter").should("be.visible"); }); });