fix invite tests, convenience command

This commit is contained in:
Max Peintner
2025-01-02 09:07:19 +01:00
parent 6e7c82cc19
commit 5a3c4d84b8
5 changed files with 15 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ describe("verify invite", () => {
},
email: {
email: "john@zitadel.com",
isVerified: true, // email needs to be verified
isVerified: false,
},
},
},
@@ -79,6 +79,15 @@ describe("verify invite", () => {
},
},
});
stub("zitadel.settings.v2.SettingsService", "GetLoginSettings", {
data: {
settings: {
passkeysType: 1,
allowUsernamePassword: true,
},
},
});
});
it.only("shows authenticators after successful invite verification", () => {

View File

@@ -3,13 +3,7 @@
"service": "zitadel.settings.v2.SettingsService",
"method": "GetBrandingSettings",
"out": {
"data": {
"settings": {
"darkTheme": {
"backgroundColor": "#ff0000"
}
}
}
"data": {}
}
},
{

View File

@@ -12,6 +12,7 @@
"test:integration:watch": "concurrently --names 'mock,test' --kill-others 'pnpm:mock' 'env-cmd -f ./.env.integration start-server-and-test dev http://localhost:3000 \"pnpm nodemon -e js,jsx,ts,tsx,css,scss --ignore \\\"__test__/**\\\" --exec \\\"pnpm test:integration:run\\\"\"'",
"test:integration:run": "cypress run --config-file ./cypress/cypress.config.ts --quiet",
"test:integration:open": "cypress open --config-file ./cypress/cypress.config.ts",
"test:integration:runall": "concurrently --names 'mock,test' --kill-others 'pnpm:mock' 'env-cmd -f ./.env.integration start-server-and-test dev http://localhost:3000 \"pnpm nodemon -e js,jsx,ts,tsx,css,scss --ignore \\\"__test__/**\\\" --exec \\\"pnpm test:integration:open\\\"\"'",
"mock": "pnpm mock:build && pnpm mock:run",
"mock:run": "pnpm mock:stop && docker run --rm --name zitadel-mock-grpc-server --publish 22220:22220 --publish 22222:22222 zitadel-mock-grpc-server",
"mock:build": "DOCKER_BUILDKIT=1 docker build --tag zitadel-mock-grpc-server ./mock",

View File

@@ -51,8 +51,8 @@ export function VerifyRedirectButton({
}
await sendVerificationRedirectWithoutCheck(command)
.catch((error) => {
setError("Could not verify user");
.catch(() => {
setError("Could not verify");
return;
})
.finally(() => {

View File

@@ -40,7 +40,7 @@ export async function sendVerification(command: VerifyUserByEmailCommand) {
});
if (!verifyResponse) {
return { error: "Could not verify user" };
return { error: "Could not verify" };
}
let session: Session | undefined;