260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
@@ -36,11 +36,7 @@ describe('use-correspondence hooks', () => {
it('should generate correct cache keys', () => {
expect(correspondenceKeys.all).toEqual(['correspondences']);
expect(correspondenceKeys.lists()).toEqual(['correspondences', 'list']);
expect(correspondenceKeys.list({ projectId: 1 })).toEqual([
'correspondences',
'list',
{ projectId: 1 },
]);
expect(correspondenceKeys.list({ projectId: 1 })).toEqual(['correspondences', 'list', { projectId: 1 }]);
expect(correspondenceKeys.details()).toEqual(['correspondences', 'detail']);
expect(correspondenceKeys.detail(1)).toEqual(['correspondences', 'detail', 1]);
});
@@ -123,7 +119,7 @@ describe('use-correspondence hooks', () => {
projectId: 1,
typeId: 1,
originatorId: 1,
recipients: []
recipients: [],
});
});
@@ -132,7 +128,7 @@ describe('use-correspondence hooks', () => {
projectId: 1,
typeId: 1,
originatorId: 1,
recipients: []
recipients: [],
});
expect(toast.success).toHaveBeenCalledWith('Correspondence created successfully');
});
@@ -154,7 +150,7 @@ describe('use-correspondence hooks', () => {
projectId: 1,
typeId: 1,
originatorId: 1,
recipients: []
recipients: [],
});
} catch {
// Expected to throw
+1 -6
View File
@@ -1,12 +1,7 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { renderHook, waitFor, act } from '@testing-library/react';
import { createTestQueryClient } from '@/lib/test-utils';
import {
useDrawings,
useDrawing,
useCreateDrawing,
drawingKeys,
} from '../use-drawing';
import { useDrawings, useDrawing, useCreateDrawing, drawingKeys } from '../use-drawing';
import { contractDrawingService } from '@/lib/services/contract-drawing.service';
import { shopDrawingService } from '@/lib/services/shop-drawing.service';
import { toast } from 'sonner';
+2 -12
View File
@@ -1,13 +1,7 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { renderHook, waitFor, act } from '@testing-library/react';
import { createTestQueryClient } from '@/lib/test-utils';
import {
useProjects,
useCreateProject,
useUpdateProject,
useDeleteProject,
projectKeys,
} from '../use-projects';
import { useProjects, useCreateProject, useUpdateProject, useDeleteProject, projectKeys } from '../use-projects';
import { projectService } from '@/lib/services/project.service';
import { toast } from 'sonner';
@@ -30,11 +24,7 @@ describe('use-projects hooks', () => {
describe('projectKeys', () => {
it('should generate correct cache keys', () => {
expect(projectKeys.all).toEqual(['projects']);
expect(projectKeys.list({ search: 'test' })).toEqual([
'projects',
'list',
{ search: 'test' },
]);
expect(projectKeys.list({ search: 'test' })).toEqual(['projects', 'list', { search: 'test' }]);
expect(projectKeys.detail(1)).toEqual(['projects', 'detail', 1]);
});
});
+3 -10
View File
@@ -1,14 +1,7 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { renderHook, waitFor, act } from '@testing-library/react';
import { createTestQueryClient } from '@/lib/test-utils';
import {
useRFAs,
useRFA,
useCreateRFA,
useUpdateRFA,
useProcessRFA,
rfaKeys,
} from '../use-rfa';
import { useRFAs, useRFA, useCreateRFA, useUpdateRFA, useProcessRFA, rfaKeys } from '../use-rfa';
import { rfaService } from '@/lib/services/rfa.service';
import { toast } from 'sonner';
@@ -111,7 +104,7 @@ describe('use-rfa hooks', () => {
projectId: 1,
subject: 'Test RFA',
rfaTypeId: 1,
toOrganizationId: 1
toOrganizationId: 1,
});
});
@@ -135,7 +128,7 @@ describe('use-rfa hooks', () => {
projectId: 1,
subject: '',
rfaTypeId: 1,
toOrganizationId: 1
toOrganizationId: 1,
});
} catch {
// Expected
+2 -13
View File
@@ -1,14 +1,7 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { renderHook, waitFor, act } from '@testing-library/react';
import { createTestQueryClient } from '@/lib/test-utils';
import {
useUsers,
useRoles,
useCreateUser,
useUpdateUser,
useDeleteUser,
userKeys,
} from '../use-users';
import { useUsers, useRoles, useCreateUser, useUpdateUser, useDeleteUser, userKeys } from '../use-users';
import { userService } from '@/lib/services/user.service';
import { toast } from 'sonner';
@@ -32,11 +25,7 @@ describe('use-users hooks', () => {
describe('userKeys', () => {
it('should generate correct cache keys', () => {
expect(userKeys.all).toEqual(['users']);
expect(userKeys.list({ search: 'john' })).toEqual([
'users',
'list',
{ search: 'john' },
]);
expect(userKeys.list({ search: 'john' })).toEqual(['users', 'list', { search: 'john' }]);
expect(userKeys.detail(1)).toEqual(['users', 'detail', 1]);
});
});