Skip to content

Commit 014ae00

Browse files
Fixed course info modal to include H1/Y1 suffix in course title (#1619)
1 parent 8afab66 commit 014ae00

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Fixed a bug on the generate page where an extraneous info popup would appear when hovering over the top left corner of the graph viewing window
2222
- Fixed a bug that led code to crash when parsing all pre-generated graphs from svg (i.e., program graphs)
2323
- Fixed a bug where redundant boolean nodes were being generated
24+
- Fixed a bug where the course info modal title did not display the H1/Y1 suffix
2425

2526
### 🔧 Internal changes
2627

js/components/common/__tests__/CourseModalButtons.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe("CourseModal", () => {
8888
// click on the back button, and AAA100H1's modal appears
8989
const backButton = screen.getByText("<")
9090
await user.click(backButton)
91-
modalHeader = screen.getByText("AAA100 Introduction to AAA Thinking")
91+
modalHeader = screen.getByText("AAA100H1 Introduction to AAA Thinking")
9292
expect(modalHeader).toBeDefined()
9393

9494
// click on the forward button, and BBB100's modal appears
@@ -114,7 +114,7 @@ describe("CourseModal", () => {
114114
// on AAA100
115115
const backButton = screen.getByText("<")
116116
await user.click(backButton)
117-
modalHeader = screen.getByText("AAA100 Introduction to AAA Thinking")
117+
modalHeader = screen.getByText("AAA100H1 Introduction to AAA Thinking")
118118
expect(modalHeader).toBeDefined()
119119

120120
// click on the course link CCC100H1, and CCC100H1's modal opens. The user's
@@ -129,7 +129,7 @@ describe("CourseModal", () => {
129129
// history of courses looks like: [AAA100, CCC100], with the user currently
130130
// on AAA100
131131
await user.click(backButton)
132-
modalHeader = screen.getByText("AAA100 Introduction to AAA Thinking")
132+
modalHeader = screen.getByText("AAA100H1 Introduction to AAA Thinking")
133133
expect(modalHeader).toBeDefined()
134134

135135
// click on the forward button, and CCC100's modal should open. The user's

js/components/common/react_modal.js.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class CourseModal extends React.Component {
118118
this.setState({
119119
course: newCourse,
120120
sessions: sessions,
121-
courseTitle: `${this.state.courseId.toUpperCase()} ${course.title}`,
121+
courseTitle: `${course.name} ${course.title}`,
122122
})
123123
})
124124
}

0 commit comments

Comments
 (0)