Add all mocks for testing
This commit is contained in:
parent
d09038fde2
commit
3322d0e4a5
@ -11,7 +11,7 @@ import { builtinThemesUrl } from "../install-builtin-keycloak-themes";
|
||||
import { downloadAndUnzip } from "../tools/downloadAndUnzip";
|
||||
import * as child_process from "child_process";
|
||||
import { ftlValuesGlobalName } from "./ftlValuesGlobalName";
|
||||
import { resourcesCommonPath, resourcesPath, subDirOfPublicDirBasename } from "../../lib/kcMockContext/urlResourcesPath";
|
||||
import { resourcesCommonPath, resourcesPath, subDirOfPublicDirBasename } from "../../lib/kcContextMocks/urlResourcesPath";
|
||||
|
||||
export function generateKeycloakThemeResources(
|
||||
params: {
|
||||
|
@ -15,4 +15,4 @@ export * from "./components/LoginVerifyEmail";
|
||||
|
||||
export * from "./tools/assert";
|
||||
|
||||
export * as kcContextMock from "./kcMockContext";
|
||||
export * as kcContextMocks from "./kcContextMocks";
|
@ -117,7 +117,6 @@ export declare namespace KcContext {
|
||||
};
|
||||
passwordRequired: boolean;
|
||||
recaptchaRequired: boolean;
|
||||
/** undefined if !recaptchaRequired */
|
||||
recaptchaSiteKey?: string;
|
||||
};
|
||||
|
||||
|
@ -145,3 +145,57 @@ export const kcLoginContext: KcContext.Login = {
|
||||
},
|
||||
"registrationDisabled": false,
|
||||
};
|
||||
|
||||
export const kcRegisterContext: KcContext.Register = {
|
||||
...kcTemplateContext,
|
||||
"url": {
|
||||
...kcLoginContext.url,
|
||||
"registrationAction": "http://localhost:8080/auth/realms/myrealm/login-actions/registration?session_code=gwZdUeO7pbYpFTRxiIxRg_QtzMbtFTKrNu6XW_f8asM&execution=12146ce0-b139-4bbd-b25b-0eccfee6577e&client_id=account&tab_id=uS8lYfebLa0"
|
||||
},
|
||||
"messagesPerField": {
|
||||
"printIfExists": (...[,x]) => x
|
||||
},
|
||||
"scripts": [],
|
||||
"isAppInitiatedAction": false,
|
||||
"pageId": "register.ftl",
|
||||
"register": {
|
||||
"formData": {}
|
||||
},
|
||||
"passwordRequired": true,
|
||||
"recaptchaRequired": false
|
||||
};
|
||||
|
||||
export const kcInfoContext: KcContext.Info ={
|
||||
...kcTemplateContext,
|
||||
"pageId": "info.ftl",
|
||||
"messageHeader": "<Message header>",
|
||||
"requiredActions": undefined,
|
||||
"skipLink": false,
|
||||
"actionUri": "#",
|
||||
"client": {
|
||||
"baseUrl": "#"
|
||||
}
|
||||
};
|
||||
|
||||
export const kcErrorContext: KcContext.Error = {
|
||||
...kcTemplateContext,
|
||||
"pageId": "error.ftl",
|
||||
"client": {
|
||||
"baseUrl": "#"
|
||||
}
|
||||
};
|
||||
|
||||
export const kcLoginResetPasswordContext: KcContext.LoginResetPassword = {
|
||||
...kcTemplateContext,
|
||||
"pageId": "login-reset-password.ftl",
|
||||
"realm":{
|
||||
...kcTemplateContext.realm,
|
||||
"loginWithEmailAllowed": false
|
||||
}
|
||||
};
|
||||
|
||||
export const kcLoginVerifyEmailContext: KcContext.LoginVerifyEmail = {
|
||||
...kcTemplateContext,
|
||||
"pageId": "login-verify-email.ftl"
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user