File tree Expand file tree Collapse file tree 5 files changed +18
-14
lines changed
assessment/__tests__/__snapshots__ Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"name" : " cadet-frontend" ,
4
- "version" : " 1.0.0 " ,
4
+ "version" : " 1.0.1 " ,
5
5
"scripts-info" : {
6
6
"format" : " Format source code" ,
7
7
"start" : " Start the Webpack development server" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const NavigationBar: React.SFC<NavigationBarProps> = props => (
31
31
className = "NavigationBar__link pt-button pt-minimal"
32
32
>
33
33
< Icon icon = { IconNames . LIGHTBULB } />
34
- < div className = "navbar-button-text hidden-xs" > Sidequests </ div >
34
+ < div className = "navbar-button-text hidden-xs" > Quests </ div >
35
35
</ NavLink >
36
36
37
37
< NavLink
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ exports[`Grading NavLink does NOT renders for Role.Student 1`] = `
9
9
Missions
10
10
</div>
11
11
</NavLink>
12
- <NavLink to =\\"/academy/sidequests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
12
+ <NavLink to =\\"/academy/quests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
13
13
<Blueprint2.Icon icon =\\"lightbulb\\" />
14
14
<div className =\\"navbar-button-text hidden-xs\\">
15
- Sidequests
15
+ Quests
16
16
</div>
17
17
</NavLink>
18
18
<NavLink to =\\"/academy/paths\\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
@@ -40,10 +40,10 @@ exports[`Grading NavLink renders for Role.Admin 1`] = `
40
40
Missions
41
41
</div>
42
42
</NavLink>
43
- <NavLink to =\\"/academy/sidequests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
43
+ <NavLink to =\\"/academy/quests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
44
44
<Blueprint2.Icon icon =\\"lightbulb\\" />
45
45
<div className =\\"navbar-button-text hidden-xs\\">
46
- Sidequests
46
+ Quests
47
47
</div>
48
48
</NavLink>
49
49
<NavLink to =\\"/academy/paths\\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
@@ -79,10 +79,10 @@ exports[`Grading NavLink renders for Role.Staff 1`] = `
79
79
Missions
80
80
</div>
81
81
</NavLink>
82
- <NavLink to =\\"/academy/sidequests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
82
+ <NavLink to =\\"/academy/quests \\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
83
83
<Blueprint2.Icon icon =\\"lightbulb\\" />
84
84
<div className =\\"navbar-button-text hidden-xs\\">
85
- Sidequests
85
+ Quests
86
86
</div>
87
87
</NavLink>
88
88
<NavLink to =\\"/academy/paths\\" activeClassName =\\"pt-active\\" className =\\"NavigationBar__link pt-button pt-minimal\\" ariaCurrent =\\"true\\">
Original file line number Diff line number Diff line change @@ -651,10 +651,10 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
651
651
Due: 18th June, 13:24
652
652
</div>
653
653
</Text>
654
- <NavLink to =\\"/academy/sidequests /2/0\\" activeClassName =\\"active\\" ariaCurrent =\\"true\\">
655
- <Route path =\\"/academy/sidequests /2/0\\" exact = { [undefined ]} strict = { [undefined ]} location = { [undefined ]} >
656
- <Link to =\\"/academy/sidequests /2/0\\" className = { [undefined ]} style = { [undefined ]} aria-current = { false } replace = { false } >
657
- <a className = { [undefined ]} style = { [undefined ]} aria-current = { false } onClick = { [Function ]} href =\\"/academy/sidequests /2/0\\">
654
+ <NavLink to =\\"/academy/quests /2/0\\" activeClassName =\\"active\\" ariaCurrent =\\"true\\">
655
+ <Route path =\\"/academy/quests /2/0\\" exact = { [undefined ]} strict = { [undefined ]} location = { [undefined ]} >
656
+ <Link to =\\"/academy/quests /2/0\\" className = { [undefined ]} style = { [undefined ]} aria-current = { false } replace = { false } >
657
+ <a className = { [undefined ]} style = { [undefined ]} aria-current = { false } onClick = { [Function ]} href =\\"/academy/quests /2/0\\">
658
658
<Blueprint2.Button fill = { false } intent =\\"none\\" minimal = { true } className =\\"\\" icon =\\"step-forward\\">
659
659
<button type =\\"button\\" className =\\"pt-button pt-minimal\\" disabled = { [undefined ]} onClick = { [undefined ]} onKeyDown = { [Function ]} onKeyUp = { [Function ]} >
660
660
<Blueprint2.Icon icon =\\"step-forward\\">
Original file line number Diff line number Diff line change 1
- import { AssessmentCategory } from '../components/assessment/assessmentShape'
1
+ import { AssessmentCategories , AssessmentCategory } from '../components/assessment/assessmentShape'
2
2
3
3
/**
4
4
* Converts an AssessmentCategory into a string for use in URLs.
5
5
*
6
+ * Note that there is an exception to the usual logic, for sidequests.
7
+ * Sidequests show up on the frontend as 'Quests' (#295) and the URLs
8
+ * must be represented as such.
9
+ *
6
10
* @param {AssessmentCategory } cat - Any AssessmentCategory, usually
7
11
* retrieved from the AssessmentCategories enum
8
12
*/
9
13
export const assessmentCategoryLink = ( cat : AssessmentCategory ) : string =>
10
- cat . toLowerCase ( ) . concat ( 's' )
14
+ cat === AssessmentCategories . Sidequest ? 'quests' : cat . toLowerCase ( ) . concat ( 's' )
11
15
12
16
/** Converts an optinal string
13
17
* parameter into an integer or null value.
You can’t perform that action at this time.
0 commit comments