mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-23 04:07:37 +00:00
fix verify tests
This commit is contained in:
@@ -83,15 +83,6 @@ describe("verify email", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// it("shows password and passkey method after successful invite verification", () => {
|
||||
// stub("zitadel.user.v2.UserService", "VerifyEmail");
|
||||
// cy.visit("/verify?userId=221394658884845598&code=abc");
|
||||
// cy.location("pathname", { timeout: 10_000 }).should(
|
||||
// "eq",
|
||||
// "/authenticator/set",
|
||||
// );
|
||||
// });
|
||||
|
||||
it("shows an error if email code validation failed", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail", {
|
||||
code: 3,
|
||||
@@ -99,7 +90,7 @@ describe("verify email", () => {
|
||||
});
|
||||
// TODO: Avoid uncaught exception in application
|
||||
cy.once("uncaught:exception", () => false);
|
||||
cy.visit("/verify?userId=221394658884845598&code=abc&submit=true");
|
||||
cy.visit("/verify?userId=221394658884845598&code=abc");
|
||||
cy.contains("Could not verify email", { timeout: 10_000 });
|
||||
});
|
||||
});
|
||||
|
@@ -39,6 +39,10 @@ export async function sendVerification(command: VerifyUserByEmailCommand) {
|
||||
return { error: "Could not verify email" };
|
||||
});
|
||||
|
||||
if ("error" in verifyResponse) {
|
||||
return verifyResponse;
|
||||
}
|
||||
|
||||
if (!verifyResponse) {
|
||||
return { error: "Could not verify" };
|
||||
}
|
||||
|
Reference in New Issue
Block a user