Skip to content

Commit 9981631

Browse files
committed
Fix more TS errors!
1 parent 4fe943f commit 9981631

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

src/commons/application/actions/__tests__/SessionActions.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,14 @@ test('updateGrading generates correct action object', async () => {
620620
id: 100
621621
},
622622
gradedAt: '2019-08-16T13:26:32+00:00'
623-
}
623+
},
624+
autogradingResults: [],
625+
autoGradingStatus: 'N/A'
624626
}
625627
],
628+
enable_llm_grading: false,
626629
assessment: {
630+
llm_assessment_prompt: null,
627631
coverPicture: 'https://i.imgur.com/dR7zBPI.jpeg',
628632
id: 1,
629633
number: '5',

src/commons/application/reducers/__tests__/SessionReducer.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,11 @@ test('UPDATE_ASSESSMENT_OVERVIEWS works correctly in updating assessment overvie
402402

403403
// Test data for UPDATE_GRADING
404404
const gradingTest1: GradingQuery = {
405+
enable_llm_grading: false,
405406
answers: [
406407
{
408+
autogradingResults: [],
409+
autoGradingStatus: 'N/A',
407410
question: await vi.importMock('../../../../features/grading/GradingTypes'),
408411
student: {
409412
name: 'test student',
@@ -418,6 +421,7 @@ const gradingTest1: GradingQuery = {
418421
}
419422
],
420423
assessment: {
424+
llm_assessment_prompt: null,
421425
coverPicture: 'test string',
422426
id: 1,
423427
number: 'M1A',
@@ -430,8 +434,11 @@ const gradingTest1: GradingQuery = {
430434
};
431435

432436
const gradingTest2: GradingQuery = {
437+
enable_llm_grading: false,
433438
answers: [
434439
{
440+
autogradingResults: [],
441+
autoGradingStatus: 'N/A',
435442
question: await vi.importMock('../../../../features/grading/GradingTypes'),
436443
student: {
437444
name: 'another test student',
@@ -446,6 +453,7 @@ const gradingTest2: GradingQuery = {
446453
}
447454
],
448455
assessment: {
456+
llm_assessment_prompt: null,
449457
coverPicture: 'another test string',
450458
id: 2,
451459
number: 'P2',

src/commons/mocks/GradingMocks.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ export const mockTestcases: Testcase[] = [
128128

129129
export const mockGradingAnswer: GradingAnswer = [
130130
{
131+
autogradingResults: [],
132+
autoGradingStatus: 'N/A',
131133
question: {
132134
answer: `function remainder(n, d) {
133135
return (n - d) < 0 ? n : remainder(n - d, d);
@@ -244,6 +246,8 @@ _italics_
244246
}
245247
},
246248
{
249+
autogradingResults: [],
250+
autoGradingStatus: 'N/A',
247251
question: {
248252
prepend: '',
249253
postpend: '',
@@ -336,6 +340,8 @@ New message from **Avenger**!
336340
}
337341
},
338342
{
343+
autogradingResults: [],
344+
autoGradingStatus: 'N/A',
339345
question: {
340346
// C is the answer
341347
prepend: '',
@@ -415,6 +421,7 @@ New message from **Avenger**!
415421

416422
export const mockGradingAssessment: GradingAssessment = {
417423
coverPicture: 'https://i.imgur.com/dR7zBPI.jpeg',
424+
llm_assessment_prompt: null,
418425
id: 1,
419426
number: '10',
420427
reading:
@@ -434,7 +441,8 @@ Starring: Source Academy`,
434441

435442
export const mockGradingQuery: GradingQuery = {
436443
answers: mockGradingAnswer,
437-
assessment: mockGradingAssessment
444+
assessment: mockGradingAssessment,
445+
enable_llm_grading: false
438446
};
439447

440448
/**

0 commit comments

Comments
 (0)