From 52278c1d067cd54b72a0cac94bff04d8b34a4602 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Thu, 30 Nov 2023 17:48:12 +0500 Subject: [PATCH 1/2] feat: add accounnt and profile urls in env files and replace legacy url --- .env | 2 ++ .env.development | 2 ++ src/components/site-header/AvatarDropdown.jsx | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env b/.env index df4f8d59c3..5b801526c8 100644 --- a/.env +++ b/.env @@ -1,5 +1,7 @@ NODE_ENV='production' USE_API_CACHE=true +ACCOUNT_SETTINGS_URL='' +ACCOUNT_PROFILE_URL='' ENABLE_SKILLS_QUIZ=false FEATURE_ENABLE_PROGRAMS=true FEATURE_PROGRAM_TYPE_FACET=true diff --git a/.env.development b/.env.development index 444be43740..e1c3cae6b0 100644 --- a/.env.development +++ b/.env.development @@ -7,6 +7,8 @@ ECOMMERCE_BASE_URL='http://localhost:18130' DISCOVERY_API_BASE_URL='http://localhost:18381' ENTERPRISE_ACCESS_BASE_URL='http://localhost:18270' ENTERPRISE_SUBSIDY_BASE_URL='http://localhost:18280' +ACCOUNT_PROFILE_URL=http://localhost:1995 +ACCOUNT_SETTINGS_URL=http://localhost:1997 ENTERPRISE_CATALOG_API_BASE_URL='http://localhost:18160' LICENSE_MANAGER_URL='http://localhost:18170' MARKETING_SITE_BASE_URL='https://stage.edx.org' diff --git a/src/components/site-header/AvatarDropdown.jsx b/src/components/site-header/AvatarDropdown.jsx index 9d4b7cb1e6..8bdb716090 100644 --- a/src/components/site-header/AvatarDropdown.jsx +++ b/src/components/site-header/AvatarDropdown.jsx @@ -12,6 +12,8 @@ const AvatarDropdown = ({ showLabel }) => { LMS_BASE_URL, LOGOUT_URL, LEARNER_SUPPORT_URL, + ACCOUNT_PROFILE_URL, + ACCOUNT_SETTINGS_URL, } = getConfig(); const { enterpriseConfig, authenticatedUser } = useContext(AppContext); const { username, profileImage } = authenticatedUser; @@ -52,8 +54,8 @@ const AvatarDropdown = ({ showLabel }) => { {enterpriseConfig.name} - My profile - Account settings + My profile + Account settings Help Sign out From 25de34d78bad8d46aebc0174c55620305450ab7c Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 1 Dec 2023 11:20:17 +0500 Subject: [PATCH 2/2] feat: replace legacy profile url with mfe url --- src/components/dashboard/SubscriptionExpirationModal.jsx | 2 +- .../course-enrollments/course-cards/BaseCourseCard.jsx | 2 +- .../course-enrollments/course-cards/CompletedCourseCard.jsx | 2 +- src/setupTest.js | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/dashboard/SubscriptionExpirationModal.jsx b/src/components/dashboard/SubscriptionExpirationModal.jsx index d5f2673903..d8897332d2 100644 --- a/src/components/dashboard/SubscriptionExpirationModal.jsx +++ b/src/components/dashboard/SubscriptionExpirationModal.jsx @@ -56,7 +56,7 @@ const SubscriptionExpirationModal = () => { const renderCertificateText = () => { const { username } = getAuthenticatedUser(); return ( - + download your completed certificates ); diff --git a/src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx b/src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx index aaa3dc45bb..0349ec4f40 100644 --- a/src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx +++ b/src/components/dashboard/main-content/course-enrollments/course-cards/BaseCourseCard.jsx @@ -409,7 +409,7 @@ class BaseCourseCard extends Component { View your certificate on {' '} - your profile → + your profile → ); } diff --git a/src/components/dashboard/main-content/course-enrollments/course-cards/CompletedCourseCard.jsx b/src/components/dashboard/main-content/course-enrollments/course-cards/CompletedCourseCard.jsx index 08536ad81a..02443d755f 100644 --- a/src/components/dashboard/main-content/course-enrollments/course-cards/CompletedCourseCard.jsx +++ b/src/components/dashboard/main-content/course-enrollments/course-cards/CompletedCourseCard.jsx @@ -47,7 +47,7 @@ const CompletedCourseCard = (props) => {

View your certificate on{' '} - + your profile →

diff --git a/src/setupTest.js b/src/setupTest.js index f983334bfd..b70b2a5e29 100644 --- a/src/setupTest.js +++ b/src/setupTest.js @@ -11,6 +11,8 @@ import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; configure({ adapter: new Adapter() }); process.env.LMS_BASE_URL = 'http://localhost:18000'; +process.env.ACCOUNT_PROFILE_URL = 'http://localhost:1995'; +process.env.ACCOUNT_SETTINGS_URL = 'http://localhost:1997'; process.env.ECOMMERCE_BASE_URL = 'http://ecommerce.url'; process.env.MARKETING_SITE_BASE_URL = 'http://marketing.url'; process.env.LEARNER_SUPPORT_SPEND_ENROLLMENT_LIMITS_URL = 'http://limits.url';