@@ -18,11 +18,11 @@ const fullNode: TimeslotNode = {
1818 status : "OPEN" ,
1919 date : "2026-01-02" ,
2020 start : "2026-01-02T10:00:00Z" ,
21- resourceAllocations : [
21+ inheritedResourceAllocations : [
2222 {
2323 quantity : 1 ,
24+ status : "ACTIVE" ,
2425 resourcePool : {
25- id : "pool-1" ,
2626 name : "Ada" ,
2727 category : "guide" ,
2828 capacity : 5 ,
@@ -49,11 +49,11 @@ describe("fromTimeslotNode", () => {
4949 startTime : "2026-01-02T10:00:00Z" ,
5050 assignedResources : [
5151 {
52- id : "pool-1" ,
5352 name : "Ada" ,
5453 capacity : 5 ,
5554 category : "guide" ,
5655 quantity : 1 ,
56+ status : "ACTIVE" ,
5757 accountUserId : "u1" ,
5858 } ,
5959 ] ,
@@ -90,7 +90,7 @@ describe("fromTimeslotNode", () => {
9090 minuteLength : null ,
9191 status : null ,
9292 date : null ,
93- resourceAllocations : [ { quantity : null , resourcePool : null } ] ,
93+ inheritedResourceAllocations : [ { quantity : null , status : null , resourcePool : null } ] ,
9494 } as unknown as TimeslotNode ;
9595
9696 expect ( fromTimeslotNode ( node , "act-1" ) ) . toEqual ( {
@@ -107,13 +107,13 @@ describe("fromTimeslotNode", () => {
107107 date : "" ,
108108 startTime : null ,
109109 assignedResources : [
110- { id : "" , name : "" , capacity : 0 , category : "" , quantity : 0 , accountUserId : null } ,
110+ { name : "" , capacity : 0 , category : "" , quantity : 0 , status : "" , accountUserId : null } ,
111111 ] ,
112112 } ) ;
113113 } ) ;
114114
115- it ( "treats missing resourceAllocations as no assigned resources" , ( ) => {
116- const node = { ...fullNode , resourceAllocations : null } as unknown as TimeslotNode ;
115+ it ( "treats missing inheritedResourceAllocations as no assigned resources" , ( ) => {
116+ const node = { ...fullNode , inheritedResourceAllocations : null } as unknown as TimeslotNode ;
117117 expect ( fromTimeslotNode ( node , "act-1" ) . assignedResources ) . toEqual ( [ ] ) ;
118118 } ) ;
119119} ) ;
0 commit comments