Skip to content

Commit

Permalink
refactor: jest to vitest of OrganizationActionItems : fixes #2557 (#2773
Browse files Browse the repository at this point in the history
)

* 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
  • Loading branch information
bandhan-majumder authored Dec 24, 2024
1 parent c14708f commit 8ec66ea
Show file tree
Hide file tree
Showing 3 changed files with 673 additions and 359 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: '',
Expand All @@ -47,6 +48,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
categoryName: '',
Expand All @@ -64,6 +66,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: 'dueDate_ASC',
where: {
assigneeName: '',
Expand All @@ -81,6 +84,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: 'dueDate_DESC',
where: {
assigneeName: '',
Expand All @@ -98,6 +102,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: '',
Expand All @@ -116,6 +121,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: '',
Expand All @@ -134,6 +140,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: 'John',
Expand All @@ -151,6 +158,7 @@ export const MOCKS = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
categoryName: 'Category 1',
Expand Down Expand Up @@ -407,6 +415,7 @@ export const MOCKS_ERROR = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: '',
Expand Down Expand Up @@ -474,6 +483,7 @@ export const MOCKS_EMPTY = [
query: ACTION_ITEM_LIST,
variables: {
organizationId: 'orgId',
eventId: 'eventId',
orderBy: null,
where: {
assigneeName: '',
Expand Down
Loading

0 comments on commit 8ec66ea

Please sign in to comment.