From 021e7cd23a61675161f2fd8545d8521fe6551d83 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Wed, 29 Nov 2023 12:58:07 -0400 Subject: [PATCH] fix: use variable to turn on personal dashboard in tests --- .env.test | 1 + .../ExpandedHeader/AuthenticatedUserDropdown.jsx | 8 ++++---- .../ExpandedHeader/AuthenticatedUserDropdown.test.jsx | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.env.test b/.env.test index 09cf4b36..1ed18959 100644 --- a/.env.test +++ b/.env.test @@ -48,3 +48,4 @@ ENABLE_NOTICES='' CAREER_LINK_URL='' OPTIMIZELY_FULL_STACK_SDK_KEY='SDK Key' EXPERIMENT_08_23_VAN_PAINTED_DOOR=true +ENABLE_EDX_PERSONAL_DASHBOARD=true diff --git a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx index 3b884a93..874bd95c 100644 --- a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx +++ b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.jsx @@ -31,10 +31,10 @@ export const AuthenticatedUserDropdown = () => { { getConfig().ENABLE_EDX_PERSONAL_DASHBOARD && ( <> - <> - SWITCH DASHBOARD - - + SWITCH DASHBOARD + + Personal + {!!dashboard && ( {dashboard.label} {formatMessage(messages.dashboard)} diff --git a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx index f4ec3bae..c23daad0 100644 --- a/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx +++ b/src/containers/LearnerDashboardHeader/ExpandedHeader/AuthenticatedUserDropdown.test.jsx @@ -46,6 +46,7 @@ const config = { SUPPORT_URL: 'http://localhost:18000/support', CAREER_LINK_URL: 'http://localhost:18000/career', LMS_BASE_URL: 'http:/localhost:18000', + ENABLE_EDX_PERSONAL_DASHBOARD: true, }; getConfig.mockReturnValue(config);