From 254bfccc62a5b731f386df11fbd6773ba738e8cd Mon Sep 17 00:00:00 2001 From: garronej Date: Mon, 20 Mar 2023 05:28:53 +0100 Subject: [PATCH] Feature Account theme customization --- src/account/kcContext/kcContextMocks.ts | 53 +++++++++++++++++-------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/src/account/kcContext/kcContextMocks.ts b/src/account/kcContext/kcContextMocks.ts index d128e23b..57a8cd03 100644 --- a/src/account/kcContext/kcContextMocks.ts +++ b/src/account/kcContext/kcContextMocks.ts @@ -8,18 +8,21 @@ const PUBLIC_URL = process.env["PUBLIC_URL"] ?? "/"; export const kcContextCommonMock: KcContext.Common = { "url": { - "loginAction": "#", "resourcesPath": pathJoin(PUBLIC_URL, mockTestingResourcesPath), "resourcesCommonPath": pathJoin(PUBLIC_URL, mockTestingResourcesCommonPath), - "loginRestartFlowUrl": "/auth/realms/myrealm/login-actions/restart?client_id=account&tab_id=HoAx28ja4xg", - "loginUrl": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg" + "resourceUrl": "#", + "accountUrl": "#", + "applicationsUrl": "#", + "getLogoutUrl": () => "#", + "logUrl": "#", + "passwordUrl": "#", + "sessionsUrl": "#", + "socialUrl": "#", + "totpUrl": "#" }, "realm": { - "name": "myrealm", - "displayName": "myrealm", - "displayNameHtml": "myrealm", "internationalizationEnabled": true, - "registrationEmailAsUsername": false + "userManagedAccessAllowed": true }, "messagesPerField": { "printIfExists": () => { @@ -126,20 +129,17 @@ export const kcContextCommonMock: KcContext.Common = { ], "currentLanguageTag": "en" }, - "auth": { - "showUsername": false, - "showResetCredentials": false, - "showTryAnotherWayLink": false - }, - "client": { - "clientId": "myApp" - }, - "scripts": [], "message": { "type": "success", "summary": "This is a test message" }, - "isAppInitiatedAction": false + "features": { + "authorization": true, + "identityFederation": true, + "log": true, + "passwordUpdateSupported": true + }, + "referrer": undefined }; export const kcContextMocks: KcContext[] = [ @@ -149,5 +149,24 @@ export const kcContextMocks: KcContext[] = [ "password": { "passwordSet": true } + }), + id({ + ...kcContextCommonMock, + "pageId": "account.ftl", + "url": { + ...kcContextCommonMock.url, + "referrerURI": "#", + "accountUrl": "#" + }, + "realm": { + ...kcContextCommonMock.realm, + "registrationEmailAsUsername": true, + "editUsernameAllowed": true + }, + "stateChecker": "", + "account": { + "firstName": "john", + "lastName": "doe" + } }) ];