From bd0c260325337926511515965a1243110ebab055 Mon Sep 17 00:00:00 2001 From: Karl Andin Date: Thu, 10 Oct 2024 08:35:56 +0200 Subject: [PATCH] fix(KUI-1519): fix to correct config name for "memoStorageUri" (should not be be uppercase URI) --- .../components/RoundInformation/CourseMemoLink.jsx | 2 +- .../components/__tests__/CourseMemoLink.test.js | 8 ++++---- .../components/__tests__/RoundInformation.test.js | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/public/js/app/components/RoundInformation/CourseMemoLink.jsx b/public/js/app/components/RoundInformation/CourseMemoLink.jsx index bae4e02a..ff7a73c0 100644 --- a/public/js/app/components/RoundInformation/CourseMemoLink.jsx +++ b/public/js/app/components/RoundInformation/CourseMemoLink.jsx @@ -10,7 +10,7 @@ export const CourseMemoLink = ({ courseCode, courseRound }) => { return (
{round_memoFile ? ( - + {translation.courseLabels.label_link_course_memo} ) : ( diff --git a/public/js/app/components/__tests__/CourseMemoLink.test.js b/public/js/app/components/__tests__/CourseMemoLink.test.js index 7daa4094..56bd19ec 100644 --- a/public/js/app/components/__tests__/CourseMemoLink.test.js +++ b/public/js/app/components/__tests__/CourseMemoLink.test.js @@ -11,7 +11,7 @@ import { useWebContext } from '../../context/WebContext' describe('Component ', () => { test('renders course offering memo link correctly if there is an available course memo as pdf', () => { - useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageURI: 'https://test.com/' } }) + useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageUri: 'https://test.com/' } }) const [translate] = i18n.messages // en const propsWithMemoFile = { @@ -26,11 +26,11 @@ describe('Component ', () => { }) test('renders course offering memo link correctly to web-based course memos', () => { - useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageURI: 'https://test.com/' } }) + useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageUri: 'https://test.com/' } }) const [translate] = i18n.messages // en const propsWithMemoFile = { courseCode: 'ABC123', - memoStorageURI: 'https://test.com/', + memoStorageUri: 'https://test.com/', courseRound: { round_memoFile: { fileName: 'test', fileDate: '1970-01-01' } }, } const propsWithMemoWebPage = { @@ -53,7 +53,7 @@ describe('Component ', () => { }) test('renders course offering memo link to pdf if it exists among other data and correctly prioriterized', () => { - useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageURI: 'https://test.com/' } }) + useWebContext.mockReturnValue({ lang: 'en', browserConfig: { memoStorageUri: 'https://test.com/' } }) const [translate] = i18n.messages // en const propsWithMemoFileAndOtherInfo = { courseCode: 'KIP1111', diff --git a/public/js/app/components/__tests__/RoundInformation.test.js b/public/js/app/components/__tests__/RoundInformation.test.js index 1cc2adeb..67733250 100644 --- a/public/js/app/components/__tests__/RoundInformation.test.js +++ b/public/js/app/components/__tests__/RoundInformation.test.js @@ -40,7 +40,7 @@ describe('Component ', () => { test('renders study pace correctly', () => { const propsWithStudyPace = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseRound: { @@ -65,7 +65,7 @@ describe('Component ', () => { const responsiblesData = 'Responsibles’ data' const teachersData = 'Teachers’ data' const propsWithEmployees = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseCode: 'SF1624', @@ -95,7 +95,7 @@ describe('Component ', () => { test('renders information about missing course employees in course offering because it contains empty string', () => { const propsWithEmptyEmployees = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseCode: 'SF1624', @@ -113,7 +113,7 @@ describe('Component ', () => { test('renders information about missing course employees in course offering because no data about employees is provided', () => { const propsWithoutEmployees = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseCode: 'SF1624', @@ -131,7 +131,7 @@ describe('Component ', () => { test('renders course offering number of places correctly if all data is available', async () => { const propsWithSeatsNum = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseRound: { @@ -169,7 +169,7 @@ describe('Component ', () => { test('renders default text and hide info icon if a course offering number of places is not provided', () => { const propsWithoutSeatsNum = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseRound: { @@ -198,7 +198,7 @@ describe('Component ', () => { test('renders course offering number of places correctly and default text in modal if selection criteria is empty', async () => { const propsWithEmptyCriteria = { - memoStorageURI: '', + memoStorageUri: '', semesterRoundState: defaultSemesterRoundState, courseData: {}, courseRound: {