File tree Expand file tree Collapse file tree 2 files changed +4
-29
lines changed
api/src/mitxonline/test-utils/factories
main/src/app-pages/ProductPages Expand file tree Collapse file tree 2 files changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -279,32 +279,7 @@ const programPageItem: PartialFactory<ProgramPageItem> = (override) => {
279279 electives : [ ] ,
280280 } ,
281281 } ,
282- req_tree : [
283- {
284- data : {
285- node_type : "operator" ,
286- operator : "all_of" ,
287- operator_value : null ,
288- program : faker . lorem . slug ( ) ,
289- course : null ,
290- title : "Required Courses" ,
291- elective_flag : false ,
292- } ,
293- id : 1 ,
294- } ,
295- {
296- data : {
297- node_type : "operator" ,
298- operator : "min_number_of" ,
299- operator_value : "2" ,
300- program : faker . lorem . slug ( ) ,
301- course : null ,
302- title : "Elective Courses" ,
303- elective_flag : true ,
304- } ,
305- id : 2 ,
306- } ,
307- ] ,
282+ req_tree : [ ] ,
308283 page : {
309284 feature_image_src : faker . image . urlLoremFlickr ( {
310285 width : 1134 ,
Original file line number Diff line number Diff line change 11import type {
22 V2Program ,
3- V1ProgramRequirement ,
3+ V2ProgramRequirement ,
44} from "@mitodl/mitxonline-api-axios/v2"
55import { V2ProgramRequirementDataNodeTypeEnum } from "@mitodl/mitxonline-api-axios/v2"
66
@@ -14,7 +14,7 @@ enum HeadingIds {
1414
1515const getElectiveSubtree = (
1616 program : V2Program ,
17- ) : V1ProgramRequirement | undefined => {
17+ ) : V2ProgramRequirement | undefined => {
1818 return program . req_tree [ 0 ] ?. children ?. find (
1919 ( child ) =>
2020 child . data . node_type === V2ProgramRequirementDataNodeTypeEnum . Operator &&
@@ -23,7 +23,7 @@ const getElectiveSubtree = (
2323}
2424const getRequiredSubtree = (
2525 program : V2Program ,
26- ) : V1ProgramRequirement | undefined => {
26+ ) : V2ProgramRequirement | undefined => {
2727 return program ?. req_tree ?. [ 0 ] ?. children ?. find (
2828 ( child ) =>
2929 child . data . node_type === V2ProgramRequirementDataNodeTypeEnum . Operator &&
You can’t perform that action at this time.
0 commit comments