From 4b115c73c15de0cdda9b007929ab443fe4ad71d9 Mon Sep 17 00:00:00 2001 From: Aad1tya27 Date: Wed, 25 Dec 2024 01:16:22 +0530 Subject: [PATCH] moved mock users to test file --- src/screens/Users/Users.spec.tsx | 1105 +++++++++++++++++++++++++++++- src/screens/Users/UsersMocks.ts | 1096 ----------------------------- 2 files changed, 1096 insertions(+), 1105 deletions(-) diff --git a/src/screens/Users/Users.spec.tsx b/src/screens/Users/Users.spec.tsx index e42ec48a8b..74ff0930a9 100644 --- a/src/screens/Users/Users.spec.tsx +++ b/src/screens/Users/Users.spec.tsx @@ -10,13 +10,7 @@ import { store } from 'state/store'; import { StaticMockLink } from 'utils/StaticMockLink'; import i18nForTest from 'utils/i18nForTest'; import Users from './Users'; -import { - EMPTY_MOCKS, - MOCKS, - MOCKS2, - MOCK_USERS, - MOCK_USERS2, -} from './UsersMocks'; +import { EMPTY_MOCKS, MOCKS, MOCKS2 } from './UsersMocks'; import useLocalStorage from 'utils/useLocalstorage'; import { describe, expect, it, beforeEach, afterEach, vi } from 'vitest'; @@ -27,6 +21,1101 @@ import { const { setItem, removeItem } = useLocalStorage(); +const MOCK_USERS = [ + { + user: { + _id: 'user1', + firstName: 'John', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '2023-04-13T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '20/06/2022', + creator: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '20/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '20/06/2022', + creator: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '20/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user1', + adminFor: [ + { + _id: '123', + }, + ], + isSuperAdmin: true, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user2', + firstName: 'Jane', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '2023-04-17T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: '456', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '21/06/2022', + creator: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '21/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: '123', + name: 'Palisadoes', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '21/06/2022', + creator: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + image: null, + email: 'john@example.com', + createdAt: '21/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user2', + adminFor: [ + { + _id: '123', + }, + ], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user3', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '2023-04-09T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user3', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, +]; + +const MOCK_USERS2 = [ + ...MOCK_USERS, + { + user: { + _id: 'user4', + firstName: 'Emma', + lastName: 'Johnson', + image: null, + email: 'emma@example.com', + createdAt: '2023-04-22T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user4', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user5', + firstName: 'Liam', + lastName: 'Smith', + image: null, + email: 'liam@example.com', + createdAt: '2023-04-23T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user5', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user6', + firstName: 'Olivia', + lastName: 'Brown', + image: null, + email: 'olivia@example.com', + createdAt: '2023-04-24T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user6', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user7', + firstName: 'Noah', + lastName: 'Williams', + image: null, + email: 'noah@example.com', + createdAt: '2023-04-25T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user7', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user8', + firstName: 'Ava', + lastName: 'Jones', + image: null, + email: 'ava@example.com', + createdAt: '2023-04-26T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user8', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user9', + firstName: 'Ethan', + lastName: 'Garcia', + image: null, + email: 'ethan@example.com', + createdAt: '2023-04-27T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user9', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user10', + firstName: 'Sophia', + lastName: 'Martinez', + image: null, + email: 'sophia@example.com', + createdAt: '2023-04-28T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user10', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user11', + firstName: 'Mason', + lastName: 'Davis', + image: null, + email: 'mason@example.com', + createdAt: '2023-04-29T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user11', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user12', + firstName: 'Isabella', + lastName: 'Rodriguez', + image: null, + email: 'isabella@example.com', + createdAt: '2023-04-30T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user12', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user13', + firstName: 'Logan', + lastName: 'Wilson', + image: null, + email: 'logan@example.com', + createdAt: '2023-04-08T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user13', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user14', + firstName: 'Mia', + lastName: 'Anderson', + image: null, + email: 'mia@example.com', + createdAt: '2023-04-07T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user14', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, + { + user: { + _id: 'user15', + firstName: 'Lucas', + lastName: 'Thomas', + image: null, + email: 'lucas@example.com', + createdAt: '2023-04-05T04:53:17.742+00:00', + registeredEvents: [], + membershipRequests: [], + organizationsBlockedBy: [ + { + _id: 'xyz', + name: 'ABC', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + joinedOrganizations: [ + { + _id: 'abc', + name: 'Joined Organization 1', + image: null, + address: { + city: 'Kingston', + countryCode: 'JM', + dependentLocality: 'Sample Dependent Locality', + line1: '123 Jamaica Street', + line2: 'Apartment 456', + postalCode: 'JM12345', + sortingCode: 'ABC-123', + state: 'Kingston Parish', + }, + createdAt: '19/06/2022', + creator: { + _id: '123', + firstName: 'Jack', + lastName: 'Smith', + image: null, + email: 'jack@example.com', + createdAt: '19/06/2022', + }, + }, + ], + }, + appUserProfile: { + _id: 'user15', + adminFor: [], + isSuperAdmin: false, + createdOrganizations: [], + createdEvents: [], + eventAdmin: [], + }, + }, +]; + const MOCKS_NEW = [ { request: { @@ -849,7 +1938,6 @@ describe('Testing Users screen', () => { const users = container .getElementsByTagName('tbody')[0] .querySelectorAll('tr'); - console.log(users, users.length); expect(users.length).toBe(12); await act(async () => { @@ -861,7 +1949,6 @@ describe('Testing Users screen', () => { const users2 = container .getElementsByTagName('tbody')[0] .querySelectorAll('tr'); - console.log(users2, users2.length); expect(users2.length).toBe(15); }); diff --git a/src/screens/Users/UsersMocks.ts b/src/screens/Users/UsersMocks.ts index d4f0537e5e..f7908cf675 100644 --- a/src/screens/Users/UsersMocks.ts +++ b/src/screens/Users/UsersMocks.ts @@ -478,7 +478,6 @@ export const EMPTY_MOCKS = [ { request: { query: USER_LIST, - variables: { first: 12, skip: 0, @@ -503,1098 +502,3 @@ export const EMPTY_MOCKS = [ }, }, ]; - -export const MOCK_USERS = [ - { - user: { - _id: 'user1', - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '2023-04-13T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '20/06/2022', - creator: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '20/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '20/06/2022', - creator: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '20/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user1', - adminFor: [ - { - _id: '123', - }, - ], - isSuperAdmin: true, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user2', - firstName: 'Jane', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '2023-04-17T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: '456', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '21/06/2022', - creator: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '21/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: '123', - name: 'Palisadoes', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '21/06/2022', - creator: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'john@example.com', - createdAt: '21/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user2', - adminFor: [ - { - _id: '123', - }, - ], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user3', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '2023-04-09T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user3', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, -]; - -export const MOCK_USERS2 = [ - ...MOCK_USERS, - { - user: { - _id: 'user4', - firstName: 'Emma', - lastName: 'Johnson', - image: null, - email: 'emma@example.com', - createdAt: '2023-04-22T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user4', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user5', - firstName: 'Liam', - lastName: 'Smith', - image: null, - email: 'liam@example.com', - createdAt: '2023-04-23T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user5', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user6', - firstName: 'Olivia', - lastName: 'Brown', - image: null, - email: 'olivia@example.com', - createdAt: '2023-04-24T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user6', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user7', - firstName: 'Noah', - lastName: 'Williams', - image: null, - email: 'noah@example.com', - createdAt: '2023-04-25T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user7', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user8', - firstName: 'Ava', - lastName: 'Jones', - image: null, - email: 'ava@example.com', - createdAt: '2023-04-26T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user8', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user9', - firstName: 'Ethan', - lastName: 'Garcia', - image: null, - email: 'ethan@example.com', - createdAt: '2023-04-27T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user9', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user10', - firstName: 'Sophia', - lastName: 'Martinez', - image: null, - email: 'sophia@example.com', - createdAt: '2023-04-28T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user10', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user11', - firstName: 'Mason', - lastName: 'Davis', - image: null, - email: 'mason@example.com', - createdAt: '2023-04-29T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user11', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user12', - firstName: 'Isabella', - lastName: 'Rodriguez', - image: null, - email: 'isabella@example.com', - createdAt: '2023-04-30T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user12', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user13', - firstName: 'Logan', - lastName: 'Wilson', - image: null, - email: 'logan@example.com', - createdAt: '2023-04-08T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user13', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user14', - firstName: 'Mia', - lastName: 'Anderson', - image: null, - email: 'mia@example.com', - createdAt: '2023-04-07T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user14', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, - { - user: { - _id: 'user15', - firstName: 'Lucas', - lastName: 'Thomas', - image: null, - email: 'lucas@example.com', - createdAt: '2023-04-05T04:53:17.742+00:00', - registeredEvents: [], - membershipRequests: [], - organizationsBlockedBy: [ - { - _id: 'xyz', - name: 'ABC', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - joinedOrganizations: [ - { - _id: 'abc', - name: 'Joined Organization 1', - image: null, - address: { - city: 'Kingston', - countryCode: 'JM', - dependentLocality: 'Sample Dependent Locality', - line1: '123 Jamaica Street', - line2: 'Apartment 456', - postalCode: 'JM12345', - sortingCode: 'ABC-123', - state: 'Kingston Parish', - }, - createdAt: '19/06/2022', - creator: { - _id: '123', - firstName: 'Jack', - lastName: 'Smith', - image: null, - email: 'jack@example.com', - createdAt: '19/06/2022', - }, - }, - ], - }, - appUserProfile: { - _id: 'user15', - adminFor: [], - isSuperAdmin: false, - createdOrganizations: [], - createdEvents: [], - eventAdmin: [], - }, - }, -];