From 6a487b11ceba0b912a82a92326b89d3591b3a13f Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sat, 11 May 2024 22:15:28 +0200 Subject: [PATCH] More sensible mock date for UpdateEmail --- src/login/kcContext/kcContextMocks.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/login/kcContext/kcContextMocks.ts b/src/login/kcContext/kcContextMocks.ts index 24968967..cc4dd3dc 100644 --- a/src/login/kcContext/kcContextMocks.ts +++ b/src/login/kcContext/kcContextMocks.ts @@ -473,8 +473,10 @@ export const kcContextMocks = [ ...kcContextCommonMock, "pageId": "update-email.ftl", "profile": { - attributes, - attributesByName + "attributes": attributes.filter(attribute => attribute.name === "email"), + "attributesByName": Object.fromEntries( + attributes.filter(attribute => attribute.name === "email").map(attribute => [attribute.name, attribute]) + ) } }), id({