Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(KUI-1519): fix to correct config name for "memoStorageUri" #382

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const CourseMemoLink = ({ courseCode, courseRound }) => {
return (
<div>
{round_memoFile ? (
<a href={`${browserConfig.memoStorageURI}${round_memoFile.fileName}`} target="_blank" rel="noreferrer">
<a href={`${browserConfig.memoStorageUri}${round_memoFile.fileName}`} target="_blank" rel="noreferrer">
{translation.courseLabels.label_link_course_memo}
</a>
) : (
Expand Down
8 changes: 4 additions & 4 deletions public/js/app/components/__tests__/CourseMemoLink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useWebContext } from '../../context/WebContext'

describe('Component <CourseMemoLink>', () => {
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 = {
Expand All @@ -26,11 +26,11 @@ describe('Component <CourseMemoLink>', () => {
})

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 = {
Expand All @@ -53,7 +53,7 @@ describe('Component <CourseMemoLink>', () => {
})

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',
Expand Down
14 changes: 7 additions & 7 deletions public/js/app/components/__tests__/RoundInformation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Component <RoundInformation>', () => {

test('renders study pace correctly', () => {
const propsWithStudyPace = {
memoStorageURI: '',
memoStorageUri: '',
semesterRoundState: defaultSemesterRoundState,
courseData: {},
courseRound: {
Expand All @@ -65,7 +65,7 @@ describe('Component <RoundInformation>', () => {
const responsiblesData = 'Responsibles’ data'
const teachersData = 'Teachers’ data'
const propsWithEmployees = {
memoStorageURI: '',
memoStorageUri: '',
semesterRoundState: defaultSemesterRoundState,
courseData: {},
courseCode: 'SF1624',
Expand Down Expand Up @@ -95,7 +95,7 @@ describe('Component <RoundInformation>', () => {

test('renders information about missing course employees in course offering because it contains empty string', () => {
const propsWithEmptyEmployees = {
memoStorageURI: '',
memoStorageUri: '',
semesterRoundState: defaultSemesterRoundState,
courseData: {},
courseCode: 'SF1624',
Expand All @@ -113,7 +113,7 @@ describe('Component <RoundInformation>', () => {

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',
Expand All @@ -131,7 +131,7 @@ describe('Component <RoundInformation>', () => {

test('renders course offering number of places correctly if all data is available', async () => {
const propsWithSeatsNum = {
memoStorageURI: '',
memoStorageUri: '',
semesterRoundState: defaultSemesterRoundState,
courseData: {},
courseRound: {
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('Component <RoundInformation>', () => {

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: {
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('Component <RoundInformation>', () => {

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: {
Expand Down
Loading