list users stub

This commit is contained in:
peintnermax
2024-04-04 08:57:54 +02:00
parent 5e4c2eebcc
commit e7309d82c6

View File

@@ -52,6 +52,36 @@ describe("login", () => {
authMethodTypes: [1], // 1 for password authentication
},
});
stub("zitadel.user.v2beta.UserService", "ListUsers", {
data: {
result: [
{
userId: "1231231231",
state: 1,
username: "max",
loginNames: ["max"],
preferredLoginName: "max",
human: {
userId: "123123123",
state: 1,
username: "max",
loginNames: ["max"],
preferredLoginName: "max",
profile: {
givenName: "Max",
familyName: "Mustermann",
avatarUrl: "https://zitadel.com/avatar.jpg",
},
email: {
email: "string",
isVerified: true,
},
},
},
],
},
});
});
it("should redirect a user with password authentication to /password", () => {
cy.visit("/loginname?loginName=john%40zitadel.com&submit=true");