fix: apply feedback

This commit is contained in:
Diana Olarte
2024-11-20 07:54:36 +11:00
committed by Deborah Kaplan
parent 2e101d5c23
commit a0e5f75f0b
5 changed files with 5 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ const configuration = {
LOGO_URL: process.env.LOGO_URL,
ENABLE_EDX_PERSONAL_DASHBOARD: process.env.ENABLE_EDX_PERSONAL_DASHBOARD === 'true',
SEARCH_CATALOG_URL: process.env.SEARCH_CATALOG_URL || null,
ENABLE_PROGRAMS: !!process.env.ENABLE_PROGRAMS,
ENABLE_PROGRAMS: process.env.ENABLE_PROGRAMS === 'true',
};
const features = {};

View File

@@ -39,7 +39,7 @@ describe('LearnerDashboardHeader', () => {
const wrapper = shallow(<LearnerDashboardHeader />);
expect(wrapper.instance.findByType(Header)[0].props.secondaryMenuItems.length).toBe(1);
});
test('should display Programs link if the service is configured in the backend', () => {
test('should display Programs link if it is enabled by configuration', () => {
mergeConfig({ ENABLE_PROGRAMS: true });
const wrapper = shallow(<LearnerDashboardHeader />);
expect(wrapper.instance.findByType(Header)[0].props.mainMenuItems.length).toBe(3);