mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 10:15:04 +00:00
mocked services
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { stub } from "../support/mock";
|
||||
|
||||
describe("verify invite", () => {
|
||||
beforeEach(() => {
|
||||
stub("zitadel.org.v2.OrganizationService", "ListOrganizations", {
|
||||
data: {
|
||||
@@ -15,8 +16,8 @@ beforeEach(() => {
|
||||
authMethodTypes: [],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
describe("verify invite", () => {
|
||||
it.only("shows authenticators after successful invite verification", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyInviteCode");
|
||||
cy.visit("/verify?userId=123&code=abc&invite=true");
|
||||
@@ -39,6 +40,23 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
describe("verify email", () => {
|
||||
beforeEach(() => {
|
||||
stub("zitadel.org.v2.OrganizationService", "ListOrganizations", {
|
||||
data: {
|
||||
details: {
|
||||
totalResult: 1,
|
||||
},
|
||||
result: [{ id: "256088834543534543" }],
|
||||
},
|
||||
});
|
||||
|
||||
stub("zitadel.user.v2.UserService", "ListAuthenticationMethodTypes", {
|
||||
data: {
|
||||
authMethodTypes: [],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("shows password and passkey method after successful invite verification", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyEmail");
|
||||
cy.visit("/verify?userId=123&code=abc");
|
||||
@@ -59,4 +77,3 @@ beforeEach(() => {
|
||||
cy.contains("Could not verify email", { timeout: 10_000 });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
zitadel/user/v2/user_service.proto
|
||||
zitadel/org/v2/org_service.proto
|
||||
zitadel/session/v2/session_service.proto
|
||||
zitadel/settings/v2/settings_service.proto
|
||||
zitadel/management.proto
|
||||
|
||||
Reference in New Issue
Block a user