@@ -61,10 +61,10 @@ test("getMyStudentsAndIepInfo - student does not have IEP", async (t) => {
6161 . executeTakeFirstOrThrow ( ) ;
6262
6363 const myStudents = await trpc . case_manager . getMyStudentsAndIepInfo . query ( ) ;
64- t . is ( myStudents . length , 1 ) ;
65- t . is ( myStudents [ 0 ] . student_id , student . student_id ) ;
66- t . is ( myStudents [ 0 ] . iep_id , null ) ;
67- t . is ( myStudents [ 0 ] . end_date , null ) ;
64+ t . is ( myStudents . records . length , 1 ) ;
65+ t . is ( myStudents . records [ 0 ] . student_id , student . student_id ) ;
66+ t . is ( myStudents . records [ 0 ] . iep_id , null ) ;
67+ t . is ( myStudents . records [ 0 ] . end_date , null ) ;
6868} ) ;
6969
7070test ( "getMyStudentsAndIepInfo - student has IEP" , async ( t ) => {
@@ -81,8 +81,8 @@ test("getMyStudentsAndIepInfo - student has IEP", async (t) => {
8181
8282 const myStudentsBefore =
8383 await trpc . case_manager . getMyStudentsAndIepInfo . query ( ) ;
84- t . is ( myStudentsBefore [ 0 ] . iep_id , null ) ;
85- t . is ( myStudentsBefore [ 0 ] . end_date , null ) ;
84+ t . is ( myStudentsBefore . records [ 0 ] . iep_id , null ) ;
85+ t . is ( myStudentsBefore . records [ 0 ] . end_date , null ) ;
8686
8787 const iep = await trpc . student . addIep . mutate ( {
8888 student_id : seed . student . student_id ,
@@ -92,8 +92,8 @@ test("getMyStudentsAndIepInfo - student has IEP", async (t) => {
9292
9393 const myStudentsAfter =
9494 await trpc . case_manager . getMyStudentsAndIepInfo . query ( ) ;
95- t . is ( myStudentsAfter [ 0 ] . iep_id , iep . iep_id ) ;
96- t . deepEqual ( myStudentsAfter [ 0 ] . end_date , iep . end_date ) ;
95+ t . is ( myStudentsAfter . records [ 0 ] . iep_id , iep . iep_id ) ;
96+ t . deepEqual ( myStudentsAfter . records [ 0 ] . end_date , iep . end_date ) ;
9797} ) ;
9898
9999test ( "getMyStudentsAndIepInfo - paras do not have access" , async ( t ) => {
@@ -375,7 +375,7 @@ test("getMyParas", async (t) => {
375375 } ) ;
376376
377377 let myParas = await trpc . case_manager . getMyParas . query ( ) ;
378- t . is ( myParas . length , 0 ) ;
378+ t . is ( myParas . records . length , 0 ) ;
379379
380380 await db
381381 . insertInto ( "paras_assigned_to_case_manager" )
@@ -386,7 +386,7 @@ test("getMyParas", async (t) => {
386386 . execute ( ) ;
387387
388388 myParas = await trpc . case_manager . getMyParas . query ( ) ;
389- t . is ( myParas . length , 1 ) ;
389+ t . is ( myParas . records . length , 1 ) ;
390390} ) ;
391391
392392test ( "getMyParas - paras do not have access" , async ( t ) => {
@@ -409,7 +409,7 @@ test("addStaff", async (t) => {
409409 } ) ;
410410
411411 const parasBeforeAdd = await trpc . case_manager . getMyParas . query ( ) ;
412- t . is ( parasBeforeAdd . length , 0 ) ;
412+ t . is ( parasBeforeAdd . records . length , 0 ) ;
413413
414414 const newParaData = {
415415 first_name : "Staffy" ,
@@ -420,9 +420,9 @@ test("addStaff", async (t) => {
420420 await trpc . case_manager . addStaff . mutate ( newParaData ) ;
421421
422422 const parasAfterAdd = await trpc . case_manager . getMyParas . query ( ) ;
423- t . is ( parasAfterAdd . length , 1 ) ;
423+ t . is ( parasAfterAdd . records . length , 1 ) ;
424424
425- const createdPara = parasAfterAdd [ 0 ] ;
425+ const createdPara = parasAfterAdd . records [ 0 ] ;
426426 t . is ( createdPara . first_name , newParaData . first_name ) ;
427427 t . is ( createdPara . last_name , newParaData . last_name ) ;
428428 t . is ( createdPara . email , newParaData . email ) ;
@@ -452,14 +452,14 @@ test("addPara", async (t) => {
452452 } ) ;
453453
454454 let myParas = await trpc . case_manager . getMyParas . query ( ) ;
455- t . is ( myParas . length , 0 ) ;
455+ t . is ( myParas . records . length , 0 ) ;
456456
457457 await trpc . case_manager . addPara . mutate ( {
458458 para_id : seed . para . user_id ,
459459 } ) ;
460460
461461 myParas = await trpc . case_manager . getMyParas . query ( ) ;
462- t . is ( myParas . length , 1 ) ;
462+ t . is ( myParas . records . length , 1 ) ;
463463} ) ;
464464
465465test ( "addPara - paras do not have access" , async ( t ) => {
@@ -492,14 +492,14 @@ test("removePara", async (t) => {
492492 . execute ( ) ;
493493
494494 let myParas = await trpc . case_manager . getMyParas . query ( ) ;
495- t . is ( myParas . length , 1 ) ;
495+ t . is ( myParas . records . length , 1 ) ;
496496
497497 await trpc . case_manager . removePara . mutate ( {
498498 para_id : seed . para . user_id ,
499499 } ) ;
500500
501501 myParas = await trpc . case_manager . getMyParas . query ( ) ;
502- t . is ( myParas . length , 0 ) ;
502+ t . is ( myParas . records . length , 0 ) ;
503503} ) ;
504504
505505test ( "removePara - paras do not have access" , async ( t ) => {
0 commit comments