260322:1648 Correct Coresspondence / Doing RFA / Correct CI
This commit is contained in:
@@ -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,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';
|
||||
|
||||
@@ -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]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user