251209:1453 Frontend: progress nest = UAT & Bug Fixing
This commit is contained in:
202
backend/test-output4.txt
Normal file
202
backend/test-output4.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
> backend@1.5.1 test
|
||||
> jest --forceExit
|
||||
|
||||
PASS src/app.controller.spec.ts
|
||||
PASS src/modules/user/user.service.spec.ts
|
||||
[Nest] 3520 - 12/09/2025, 8:29:38 AM ERROR [FileStorageService] Failed to write file: D:\nap-dms.lcbp3\backend\uploads\temp\0db75d72-efc1-4d36-a739-6fdeccb9f53a.pdf
|
||||
[Nest] 3520 - 12/09/2025, 8:29:38 AM ERROR [FileStorageService] Error: Write error
|
||||
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\common\file-storage\file-storage.service.spec.ts:90:9)
|
||||
at Promise.finally.completed (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1557:28)
|
||||
at new Promise (<anonymous>)
|
||||
at callAsyncCircusFn (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1497:10)
|
||||
at _callCircusTest (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1007:40)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at _runTest (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:947:3)
|
||||
at D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:849:7
|
||||
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:862:11)
|
||||
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:857:11)
|
||||
at _runTestsForDescribeBlock (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:857:11)
|
||||
at run (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:761:3)
|
||||
at runAndTransformResultsToJestFormat (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\jestAdapterInit.js:1918:21)
|
||||
at jestAdapter (D:\nap-dms.lcbp3\backend\node_modules\jest-circus\build\runner.js:101:19)
|
||||
at runTestInternal (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:277:16)
|
||||
at runTest (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:345:7)
|
||||
at Object.worker (D:\nap-dms.lcbp3\backend\node_modules\jest-runner\build\testWorker.js:499:12)
|
||||
PASS src/common/file-storage/file-storage.service.spec.ts
|
||||
[Nest] 38888 - 12/09/2025, 8:29:38 AM ERROR [DocumentNumberingService] Error generating number for doc_num:1:1:1:2025
|
||||
[Nest] 38888 - 12/09/2025, 8:29:38 AM ERROR [DocumentNumberingService] InternalServerErrorException: Failed to generate document number after retries.
|
||||
at DocumentNumberingService.generateNextNumber (D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.ts:182:13)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\modules\document-numbering\document-numbering.service.spec.ts:175:7) {
|
||||
response: {
|
||||
message: 'Failed to generate document number after retries.',
|
||||
error: 'Internal Server Error',
|
||||
statusCode: 500
|
||||
},
|
||||
status: 500,
|
||||
options: {}
|
||||
}
|
||||
[Nest] 16508 - 12/09/2025, 8:29:38 AM ERROR [WorkflowEngineService] Transition Failed for inst-1: DB Error
|
||||
PASS src/modules/workflow-engine/workflow-engine.service.spec.ts
|
||||
FAIL src/modules/document-numbering/document-numbering.service.spec.ts
|
||||
● DocumentNumberingService › should be defined
|
||||
|
||||
TypeError: Cannot read properties of undefined (reading 'disconnect')
|
||||
|
||||
86 |
|
||||
87 | onModuleDestroy() {
|
||||
> 88 | this.redisClient.disconnect();
|
||||
| ^
|
||||
89 | }
|
||||
90 |
|
||||
91 | /**
|
||||
|
||||
at DocumentNumberingService.onModuleDestroy (modules/document-numbering/document-numbering.service.ts:88:22)
|
||||
at Object.<anonymous> (modules/document-numbering/document-numbering.service.spec.ts:120:13)
|
||||
|
||||
● DocumentNumberingService › generateNextNumber › should generate a new number successfully
|
||||
|
||||
expect(received).toBe(expected) // Object.is equality
|
||||
|
||||
Expected: "000001"
|
||||
Received: "0001"
|
||||
|
||||
146 | const result = await service.generateNextNumber(mockContext);
|
||||
147 |
|
||||
> 148 | expect(result).toBe('000001'); // Default padding 6
|
||||
| ^
|
||||
149 | expect(counterRepo.save).toHaveBeenCalled();
|
||||
150 | expect(auditRepo.save).toHaveBeenCalled();
|
||||
151 | });
|
||||
|
||||
at Object.<anonymous> (modules/document-numbering/document-numbering.service.spec.ts:148:22)
|
||||
|
||||
PASS src/common/auth/casl/ability.factory.spec.ts
|
||||
PASS src/modules/project/project.service.spec.ts
|
||||
[Nest] 16436 - 12/09/2025, 8:29:39 AM ERROR [WorkflowDslParser] Failed to parse stored DSL for definition 1
|
||||
[Nest] 16436 - 12/09/2025, 8:29:39 AM ERROR [WorkflowDslParser] ZodError: [
|
||||
{
|
||||
"expected": "object",
|
||||
"code": "invalid_type",
|
||||
"path": [],
|
||||
"message": "Invalid input: expected object, received undefined"
|
||||
}
|
||||
]
|
||||
at WorkflowDslParser.getParsedDsl (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.ts:163:32)
|
||||
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
||||
at Object.<anonymous> (D:\nap-dms.lcbp3\backend\src\modules\workflow-engine\dsl\parser.service.spec.ts:178:22)
|
||||
PASS src/common/auth/auth.service.spec.ts
|
||||
ΓùÅ Console
|
||||
|
||||
console.log
|
||||
🔍 Checking login for: testuser
|
||||
|
||||
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
||||
|
||||
console.log
|
||||
🔍 Checking login for: unknown
|
||||
|
||||
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
||||
|
||||
console.log
|
||||
❌ User not found in database
|
||||
|
||||
at AuthService.validateUser (common/auth/auth.service.ts:51:15)
|
||||
|
||||
console.log
|
||||
🔍 Checking login for: testuser
|
||||
|
||||
at AuthService.validateUser (common/auth/auth.service.ts:43:13)
|
||||
|
||||
FAIL src/modules/workflow-engine/dsl/parser.service.spec.ts
|
||||
● WorkflowDslParser › parse › should parse valid RFA workflow DSL
|
||||
|
||||
expect(received).toBe(expected) // Object.is equality
|
||||
|
||||
Expected: "RFA_APPROVAL"
|
||||
Received: undefined
|
||||
|
||||
41 |
|
||||
42 | expect(result).toBeDefined();
|
||||
> 43 | expect(result.name).toBe('RFA_APPROVAL');
|
||||
| ^
|
||||
44 | expect(result.version).toBe('1.0.0');
|
||||
45 | expect(result.isActive).toBe(true);
|
||||
46 | expect(mockRepository.save).toHaveBeenCalled();
|
||||
|
||||
at Object.<anonymous> (modules/workflow-engine/dsl/parser.service.spec.ts:43:27)
|
||||
|
||||
● WorkflowDslParser › getParsedDsl › should retrieve and parse stored DSL
|
||||
|
||||
BadRequestException: Invalid stored DSL: [
|
||||
{
|
||||
"expected": "object",
|
||||
"code": "invalid_type",
|
||||
"path": [],
|
||||
"message": "Invalid input: expected object, received undefined"
|
||||
}
|
||||
]
|
||||
|
||||
167 | error
|
||||
168 | );
|
||||
> 169 | throw new BadRequestException(`Invalid stored DSL: ${error?.message}`);
|
||||
| ^
|
||||
170 | }
|
||||
171 | }
|
||||
172 |
|
||||
|
||||
at WorkflowDslParser.getParsedDsl (modules/workflow-engine/dsl/parser.service.ts:169:13)
|
||||
at Object.<anonymous> (modules/workflow-engine/dsl/parser.service.spec.ts:178:22)
|
||||
|
||||
PASS src/common/file-storage/file-storage.controller.spec.ts
|
||||
PASS src/modules/project/project.controller.spec.ts
|
||||
PASS src/modules/json-schema/json-schema.controller.spec.ts
|
||||
PASS src/common/auth/auth.controller.spec.ts
|
||||
FAIL src/modules/correspondence/correspondence.service.spec.ts
|
||||
● CorrespondenceService › findAll › should return paginated correspondences
|
||||
|
||||
expect(received).toBeDefined()
|
||||
|
||||
Received: undefined
|
||||
|
||||
119 | it('should return paginated correspondences', async () => {
|
||||
120 | const result = await service.findAll({ projectId: 1 });
|
||||
> 121 | expect(result.data).toBeDefined();
|
||||
| ^
|
||||
122 | expect(result.meta).toBeDefined();
|
||||
123 | });
|
||||
124 | });
|
||||
|
||||
at Object.<anonymous> (modules/correspondence/correspondence.service.spec.ts:121:27)
|
||||
|
||||
FAIL src/modules/correspondence/correspondence.controller.spec.ts (5.39 s)
|
||||
● CorrespondenceController › create › should create a correspondence
|
||||
|
||||
expect(jest.fn()).toHaveBeenCalledWith(...expected)
|
||||
|
||||
- Expected
|
||||
+ Received
|
||||
|
||||
{"correspondence_type_id": 1, "project_id": 1, "subject": "Test Subject"},
|
||||
- 1,
|
||||
+ {"userId": 1},
|
||||
|
||||
Number of calls: 1
|
||||
|
||||
76 | const result = await controller.create(createDto as any, mockReq as any);
|
||||
77 |
|
||||
> 78 | expect(mockCorrespondenceService.create).toHaveBeenCalledWith(
|
||||
| ^
|
||||
79 | createDto,
|
||||
80 | 1
|
||||
81 | );
|
||||
|
||||
at Object.<anonymous> (modules/correspondence/correspondence.controller.spec.ts:78:48)
|
||||
|
||||
Test Suites: 4 failed, 11 passed, 15 total
|
||||
Tests: 6 failed, 60 passed, 66 total
|
||||
Snapshots: 0 total
|
||||
Time: 6.662 s
|
||||
Ran all test suites.
|
||||
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
|
||||
Reference in New Issue
Block a user