refactor: verander getters frontend naar hardcoded
This commit is contained in:
		
							parent
							
								
									ac4ece29c7
								
							
						
					
					
						commit
						16a11d4268
					
				
					 3 changed files with 3 additions and 6 deletions
				
			
		|  | @ -1,12 +1,11 @@ | ||||||
| import { describe, it, expect, beforeEach } from "vitest"; | import { describe, it, expect, beforeEach } from "vitest"; | ||||||
| import { AssignmentController } from "../../src/controllers/assignments"; | import { AssignmentController } from "../../src/controllers/assignments"; | ||||||
| import {getClass01} from "@dwengo-1/backend/tests/test_assets/classes/classes.testdata"; |  | ||||||
| 
 | 
 | ||||||
| describe("AssignmentController Tests", () => { | describe("AssignmentController Tests", () => { | ||||||
|     let controller: AssignmentController; |     let controller: AssignmentController; | ||||||
| 
 | 
 | ||||||
|     beforeEach(() => { |     beforeEach(() => { | ||||||
|         controller = new AssignmentController(getClass01().classId); // Example class ID
 |         controller = new AssignmentController( 'X2J9QT'); // Example class ID (class01)
 | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     it("should fetch all assignments", async () => { |     it("should fetch all assignments", async () => { | ||||||
|  |  | ||||||
|  | @ -1,10 +1,9 @@ | ||||||
| import { describe, expect, it } from "vitest"; | import { describe, expect, it } from "vitest"; | ||||||
| import { GroupController } from "../../src/controllers/groups"; | import { GroupController } from "../../src/controllers/groups"; | ||||||
| import {getClass01} from "@dwengo-1/backend/tests/test_assets/classes/classes.testdata"; |  | ||||||
| 
 | 
 | ||||||
| describe("Test controller groups", () => { | describe("Test controller groups", () => { | ||||||
|     it("Get groups", async () => { |     it("Get groups", async () => { | ||||||
|         const classId = getClass01().classId; |         const classId = 'X2J9QT'; // class01
 | ||||||
|         const assignmentNumber = 21000; |         const assignmentNumber = 21000; | ||||||
| 
 | 
 | ||||||
|         const controller = new GroupController(classId, assignmentNumber); |         const controller = new GroupController(classId, assignmentNumber); | ||||||
|  |  | ||||||
|  | @ -1,12 +1,11 @@ | ||||||
| import { describe, expect, it } from "vitest"; | import { describe, expect, it } from "vitest"; | ||||||
| import { SubmissionController } from "../../src/controllers/submissions"; | import { SubmissionController } from "../../src/controllers/submissions"; | ||||||
| import { Language } from "../../src/data-objects/language"; | import { Language } from "../../src/data-objects/language"; | ||||||
| import {getClass01} from "@dwengo-1/backend/tests/test_assets/classes/classes.testdata"; |  | ||||||
| 
 | 
 | ||||||
| describe("Test controller submissions", () => { | describe("Test controller submissions", () => { | ||||||
|     it("Get submission by number", async () => { |     it("Get submission by number", async () => { | ||||||
|         const hruid = "id03"; |         const hruid = "id03"; | ||||||
|         const classId = getClass01().classId; |         const classId = 'X2J9QT'; // class01
 | ||||||
|         const controller = new SubmissionController(hruid); |         const controller = new SubmissionController(hruid); | ||||||
| 
 | 
 | ||||||
|         const data = await controller.getByNumber(Language.English, 1, classId, 1, 1, 1); |         const data = await controller.getByNumber(Language.English, 1, classId, 1, 1, 1); | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl