describe("smoke test", () => { it("redirects an unauthenticated visitor to the login page", () => { cy.intercept("GET", "**/auth/me", { statusCode: 401, body: { error: "Non authentifié" } }); cy.visit("/"); cy.url().should("include", "/login"); cy.contains("h1", "Se connecter").should("be.visible"); }); });