Skip to content

Commit 8ec66ea

Browse files
refactor: jest to vitest of OrganizationActionItems : fixes #2557 (#2773)
* added missed mocks Not all the params were being mocked properly. As a result of not getting the expected response, useQuery was returning error in actionItemsError. This is fixed now * Delete src/screens/OrganizationActionItems/OrganizationActionItems.test.tsx * Create OrganizationActionItems.spec.tsx Migrated to vitest with functionalities * Update OrganizationActionItems.spec.tsx
1 parent c14708f commit 8ec66ea

File tree

3 files changed

+673
-359
lines changed

3 files changed

+673
-359
lines changed

src/screens/OrganizationActionItems/OrganizationActionItem.mocks.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const MOCKS = [
2424
query: ACTION_ITEM_LIST,
2525
variables: {
2626
organizationId: 'orgId',
27+
eventId: 'eventId',
2728
orderBy: null,
2829
where: {
2930
assigneeName: '',
@@ -47,6 +48,7 @@ export const MOCKS = [
4748
query: ACTION_ITEM_LIST,
4849
variables: {
4950
organizationId: 'orgId',
51+
eventId: 'eventId',
5052
orderBy: null,
5153
where: {
5254
categoryName: '',
@@ -64,6 +66,7 @@ export const MOCKS = [
6466
query: ACTION_ITEM_LIST,
6567
variables: {
6668
organizationId: 'orgId',
69+
eventId: 'eventId',
6770
orderBy: 'dueDate_ASC',
6871
where: {
6972
assigneeName: '',
@@ -81,6 +84,7 @@ export const MOCKS = [
8184
query: ACTION_ITEM_LIST,
8285
variables: {
8386
organizationId: 'orgId',
87+
eventId: 'eventId',
8488
orderBy: 'dueDate_DESC',
8589
where: {
8690
assigneeName: '',
@@ -98,6 +102,7 @@ export const MOCKS = [
98102
query: ACTION_ITEM_LIST,
99103
variables: {
100104
organizationId: 'orgId',
105+
eventId: 'eventId',
101106
orderBy: null,
102107
where: {
103108
assigneeName: '',
@@ -116,6 +121,7 @@ export const MOCKS = [
116121
query: ACTION_ITEM_LIST,
117122
variables: {
118123
organizationId: 'orgId',
124+
eventId: 'eventId',
119125
orderBy: null,
120126
where: {
121127
assigneeName: '',
@@ -134,6 +140,7 @@ export const MOCKS = [
134140
query: ACTION_ITEM_LIST,
135141
variables: {
136142
organizationId: 'orgId',
143+
eventId: 'eventId',
137144
orderBy: null,
138145
where: {
139146
assigneeName: 'John',
@@ -151,6 +158,7 @@ export const MOCKS = [
151158
query: ACTION_ITEM_LIST,
152159
variables: {
153160
organizationId: 'orgId',
161+
eventId: 'eventId',
154162
orderBy: null,
155163
where: {
156164
categoryName: 'Category 1',
@@ -407,6 +415,7 @@ export const MOCKS_ERROR = [
407415
query: ACTION_ITEM_LIST,
408416
variables: {
409417
organizationId: 'orgId',
418+
eventId: 'eventId',
410419
orderBy: null,
411420
where: {
412421
assigneeName: '',
@@ -474,6 +483,7 @@ export const MOCKS_EMPTY = [
474483
query: ACTION_ITEM_LIST,
475484
variables: {
476485
organizationId: 'orgId',
486+
eventId: 'eventId',
477487
orderBy: null,
478488
where: {
479489
assigneeName: '',

0 commit comments

Comments
 (0)