From fe658c179668f970ce3910fcf726fa6623582ac2 Mon Sep 17 00:00:00 2001 From: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:19:08 +0200 Subject: [PATCH] fix: added LMS_BASE_URL for brand logo (#498) --- src/containers/LearnerDashboardHeader/BrandLogo.jsx | 4 +--- src/containers/LearnerDashboardHeader/BrandLogo.test.jsx | 5 +++-- .../__snapshots__/BrandLogo.test.jsx.snap | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/containers/LearnerDashboardHeader/BrandLogo.jsx b/src/containers/LearnerDashboardHeader/BrandLogo.jsx index d9a79af..72d8e1e 100644 --- a/src/containers/LearnerDashboardHeader/BrandLogo.jsx +++ b/src/containers/LearnerDashboardHeader/BrandLogo.jsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { useIntl } from '@edx/frontend-platform/i18n'; import { reduxHooks } from 'hooks'; @@ -12,7 +10,7 @@ export const BrandLogo = () => { const dashboard = reduxHooks.useEnterpriseDashboardData(); return ( - + ({ @@ -23,6 +24,6 @@ describe('BrandLogo', () => { reduxHooks.useEnterpriseDashboardData.mockReturnValueOnce(null); const wrapper = shallow(); expect(wrapper.snapshot).toMatchSnapshot(); - expect(wrapper.instance.findByType('a')[0].props.href).toEqual('/'); + expect(wrapper.instance.findByType('a')[0].props.href).toEqual(getConfig().LMS_BASE_URL); }); }); diff --git a/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap b/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap index f069b0a..6fe98c3 100644 --- a/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap +++ b/src/containers/LearnerDashboardHeader/__snapshots__/BrandLogo.test.jsx.snap @@ -16,7 +16,7 @@ exports[`BrandLogo dashboard defined 1`] = ` exports[`BrandLogo dashboard undefined 1`] = `