mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-13 13:12:15 +00:00
tests
This commit is contained in:
@@ -2,15 +2,15 @@ import { stub } from "../support/mock";
|
||||
|
||||
describe("/verify", () => {
|
||||
it("shows password and passkey method after successful invite verification", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail");
|
||||
stub("zitadel.user.v2.UserService", "VerifyInviteCode");
|
||||
cy.visit("/verify?userId=123&code=abc&submit=true&invite=true");
|
||||
cy.location("pathname", { timeout: 10_000 }).should(
|
||||
"eq",
|
||||
"/authenticator/set",
|
||||
);
|
||||
});
|
||||
it("shows an error if validation failed", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail", {
|
||||
it("shows an error if invite code validation failed", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyInviteCode", {
|
||||
code: 3,
|
||||
error: "error validating code",
|
||||
});
|
||||
@@ -19,4 +19,23 @@ describe("/verify", () => {
|
||||
cy.visit("/verify?userId=123&code=abc&submit=true&invite=true");
|
||||
cy.contains("Could not verify user");
|
||||
});
|
||||
|
||||
it("shows password and passkey method after successful invite verification", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail");
|
||||
cy.visit("/verify?userId=123&code=abc&submit=true");
|
||||
cy.location("pathname", { timeout: 10_000 }).should(
|
||||
"eq",
|
||||
"/authenticator/set",
|
||||
);
|
||||
});
|
||||
it("shows an error if invite code validation failed", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail", {
|
||||
code: 3,
|
||||
error: "error validating code",
|
||||
});
|
||||
// TODO: Avoid uncaught exception in application
|
||||
cy.once("uncaught:exception", () => false);
|
||||
cy.visit("/verify?userId=123&code=abc&submit=true");
|
||||
cy.contains("Could not verify user");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user