From e94e2cd5e6ed35bf7fd072d3e44d29b2b36bcd53 Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Mon, 28 Aug 2023 07:58:35 -0400 Subject: [PATCH] Make base theme hidden for admin and account UIs. (#22672) (#22728) * Make base theme hidden for admin and account UIs. * Fix test. --- .../e2e/realm_settings_tabs_test.spec.ts | 1 - .../admin-ui/src/realm-settings/ThemesTab.tsx | 40 ++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts b/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts index 4be9e9063aa..41ae7000a33 100644 --- a/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts +++ b/js/apps/admin-ui/cypress/e2e/realm_settings_tabs_test.spec.ts @@ -126,7 +126,6 @@ describe("Realm settings tabs tests", () => { realmSettingsPage.selectLoginThemeType("keycloak"); realmSettingsPage.selectAccountThemeType("keycloak"); - realmSettingsPage.selectAdminThemeType("base"); realmSettingsPage.selectEmailThemeType("base"); realmSettingsPage.saveThemes(); diff --git a/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx b/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx index 120e52c8402..f1196f9ed29 100644 --- a/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx @@ -120,15 +120,17 @@ export const RealmSettingsThemesTab = ({ placeholderText="Select a theme" data-testid="select-account-theme" > - {themeTypes.account.map((theme, idx) => ( - - {t(`${theme.name}`)} - - ))} + {themeTypes.account + .filter((theme) => theme.name !== "base") + .map((theme, idx) => ( + + {t(`${theme.name}`)} + + ))} )} /> @@ -162,15 +164,17 @@ export const RealmSettingsThemesTab = ({ placeholderText="Select a theme" data-testid="select-admin-theme" > - {themeTypes.admin.map((theme, idx) => ( - - {t(`${theme.name}`)} - - ))} + {themeTypes.admin + .filter((theme) => theme.name !== "base") + .map((theme, idx) => ( + + {t(`${theme.name}`)} + + ))} )} />