Project Name - da-tf-project-1-1b0f Environment - beta Service Name - beta-backend-api Build Id - e348fa73-0885-46bf-b26d-68aab6ee5597 Executed Time - Fri Sep 20 13:50:12 UTC 2024 ------------------------------------------------ > data-automation-web-api@0.0.0 test > ./node_modules/.bin/nyc mocha --timeout 10000 app/test/unitTest/**/*.js >>>>>>>>>> initLogger::skipping Logstash transport >>>>>>>>>> MODE: development supressLogstash: true {} #contactsController - validateDataForDedupeKeys Validating contact data for creating DedupeKeys Check If Contact data is InValid ✔ Throw error Check If contact data is Valid ✔ Should not throw error If the Email value is exist ✔ Should not throw error If data valid for create companyDedupe key ✔ Should not throw error If data valid for create companyDomainDedupe key #contactsController - checkContactReuse Returns a contact that already exists in DB Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If not send any data of contact in the body of the request ✔ Should return `400` with `Bad Request` error Check If ClientId is invalid ✔ Should return `400` with `Bad Request` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If TemplateId is invalid ✔ Should return `400` with `Bad Request` error Check If ContactExpiry is invalid ✔ Should return `400` with `Bad Request` error When contactExpiry value is Empty ✔ Should return `400` with `Bad Request` error When contactExpiry value is not a Number ✔ Should return `400` with `Bad Request` error When contactExpiry value is less then 0 ✔ Should return `400` with `Bad Request` error When contactExpiry value is getter then 360 ✔ Should return `400` with `Bad Request` error When contactExpiry value is not divided by 30 Check If Required data not send in Body ✔ Should return `400` with `Bad Request` error Check If get any errors while getting existing contact data Using the service function ✔ Should return `500` with error message Check If the return a existing contact ✔ Should return `500` with error message #accountsController - get Get All Accounts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of accounts ✔ Should return `200` with accounts list Check if correct params are passed for getting list of accounts ✔ Should return `500` when some internal error occurs #getAccountAndLocationByDomain ✔ should handle user with invalid role ✔ should handle missing domain ✔ should fetch account successfully ✔ should handle error while fetching account #getDomain ✔ should log the start of fetching domain ✔ should handle unauthorized user ✔ should handle missing companyName ✔ should fetch domain successfully ✔ should handle error while fetching domain #validateDomain ✔ should log the start of domain validation ✔ should handle unauthorized user ✔ should handle missing domain ✔ should validate domain successfully ✔ should handle error while validating domain #contactsController - get Get All Contacts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of Contacts ✔ Should return `200` with Contacts list Check if correct params are passed for getting list of Contacts ✔ Should return `500` when some internal error occurs #masterContactsController - getContactById ✔ Should return 400 when contactId is not provided ✔ Should return 400 when convertInToGmFormate is not a Boolean ✔ Should return 500 when an error occurs while getting contact ✔ Should return contact when retrieved successfully #filesController - delete Delete File by Id Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If the file id is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed for deleting a file ✔ Should return `200` with deleted file id Check if correct params are passed for deleting a file ✔ Should return `500` when some internal error occurs #filesController - post Create a file and its info Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If Mandatory values are available ✔ Should return `400` when a mandatory value is not available Check If File type is valid ✔ Should return `400` when a mandatory value is not available Check If Operation name is valid ✔ Should return `400` when a mandatory value is not available Check If mapping is parsed correctly ✔ Should return `400` when a there is mapping parsing error Check If operation param is parsed correctly ✔ Should return `400` when a there is mapping parsing error Create a master file ✔ Should successfully create a master file when all params are passed correctly ✔ Should throw error when something internally fails while creating master file #jobsController - get Get All Master Jobs Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of master jobs ✔ Should return `200` with master jobs list Check if correct params are passed for getting list of master jobs ✔ Should return `500` when some internal error occurs #jobsController - getSignedURL Get Master Job Signed URL Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If jobId is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed for getting signed url of master job ✔ Should return `200` with master job signed URL Check if correct params are passed for getting signed url of master job ✔ Should return `500` when some internal error occurs #jobsController - getJobErrors Get Master Job Errors List Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If jobId is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed for getting master jobs errors list ✔ Should return `200` with master jobs errors list Check if correct params are passed for getting master jobs errors list ✔ Should return `500` when some internal error occurs #locationController - get Get All Locations Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check if correct params are passed for getting list of location ✔ Should return `200` with master location list Check if correct params are passed for getting list of location ✔ Should return `200` with master location list #industryController - get Get All Industries Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error #naicsCodeController - get Get All NAICS Code Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check if correct params are passed for getting list of naics code ✔ Should return `200` with master naics code list (69ms) Check if correct params are passed for getting list of naics code ✔ Should return `500` when some internal error occurs #subIndustryController - get Get All Sub Industries For All Industries Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If the industries is invalid ✔ Should return `400` when industries parsing fails ✔ Should return `400` when industries is not an array or is an empty array #technologyController - get Get All technologies Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check if correct params are passed for getting list of technologies ✔ Should return `200` with master technologies list Check if correct params are passed for getting list of technologies ✔ Should return `500` when some internal error occurs #verifyAccountsController - get Get All Verify Accounts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check if correct params are passed for getting list of verify accounts ✔ Should return `200` with verify accounts list Check if correct params are passed for getting list of verify accounts ✔ Should return `500` when some internal error occurs #verifyAccountsController - post Create a Verify Account Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If the account is passed in body ✔ Should return `400` with `Bad Request` error Check If the domain is passed in account ✔ Should return `400` with `Bad Request` error Check If verify account params are passed successfully ✔ Should successfully create a verify account when all params are passed correctly Check If verify account params are passed successfully ✔ Should throw error when something goes wrong #accountsController - getAccountDispositions Get Accounts Dispositions Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed ✔ Should return `200` with task stats data #accountsController - getAccountStats Get Accounts Stats Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check if correct params are passed ✔ Should return `200` with account stats data Check if correct params are passed ✔ Should return `500` when some internal error occurs #accountsController - put Update account data Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If AccountId is invalid ✔ Should return `400` with `Bad Request` error Check If Account is Empty ✔ Should return `400` with `Bad Request` error Check If Account-Type is invalid ✔ Should return `400` with `Bad Request` error Check If get any errors while editing Account data Using the service function ✔ Should return `500` with error message Check if account edited successfully ✔ Should return `200` #accountsController - checkAccountSuppressionOrDuplicate Check Account is Suppression or Duplicate Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If Account is Empty ✔ Should return `400` with `Bad Request` error Check If get duplicate check errors while checking Account is duplicate or not Using the service function ✔ Should return `500` with error `DEDUPE_CHECK_ERROR` Check If get suppression check errors while checking Account is suppressed or not Using the service function ✔ Should return `500` with error `SUPPRESSION_CHECK_ERROR` Check If get any errors while editing Account data Using the service function ✔ Should return `500` with error message Check if check account suppress or duplicate successfully ✔ Should return `200` with match result #accountsController - get Get All Accounts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of accounts ✔ Should return `200` with accounts list Check if correct params are passed for getting list of contacts ✔ Should return `500` when some internal error occurs #contactsController - post Save Contacts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If Contact is invalid ✔ Should return `400` with `Bad Request` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If AccountId is invalid ✔ Should return `400` with `Bad Request` error Check If ClientId is invalid ✔ Should return `400` with `Bad Request` error Check If Contact FirstName is invalid ✔ Should return `400` with `Required params not passed` error Check If Contact LastName is invalid ✔ Should return `400` with `Required params not passed` error Check If TaskLink Id is invalid ✔ Should return `400` with `Bad Request` error Check If Research Status is invalid ✔ Should return `400` with `Bad Request` error Check If Task Disposition is invalid ✔ Should return `400` with `Bad Request` error Check If Contact Disposition is invalid ✔ Should return `400` with `Bad Request` error Check If Contact Expiry is invalid ✔ Should return `400` with `Bad Request` error Check If Contact Expiry is not a number (NAN) ✔ Should return `400` with `Bad Request` error Check If Contact Expiry is less than 0 ✔ Should return `400` with `Bad Request` error Check If Contact Expiry is greater than 360 ✔ Should return `400` with `Bad Request` error Check If Contact Expiry is not a multiple of 30 days (1 month) ✔ Should return `400` with `Bad Request` error Check if Contact is saved successfully ✔ Should return `201` Check If any errors are caught while saving Contact data using the service function ✔ Should return `500` with error message #contactsController - getAllContactStats Get Contacts Stats Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check if correct params are passed ✔ Should return `200` with contact stats data Check if correct params are passed ✔ Should return `500` when some internal error occurs #contactsController - getContactUniqueFields Get Contacts Unique fields Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If "field" is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed ✔ Should return `200` with unique list of Contacts Disposition data ✔ Should return `200` with unique list of Contacts UpdatedBy data Check if correct params are passed ✔ Should return `500` when some internal error occurs in getContactDispositions ✔ Should return `500` when some internal error occurs in getContactUpdatedBy #contactsController - get Get All Contacts Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of contacts ✔ Should return `200` with contacts list Check if correct params are passed for getting list of contacts ✔ Should return `500` when some internal error occurs #contactsController - checkContactSuppressionOrDuplicate Returns a contact result duplicate/exact-suppressed or fuzzy-suppressed Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If Contact is empty ✔ Should return `400` with `Bad Request` error Check If Contact is duplicate ✔ Should return `200` with duplicate contact Result Check If Contact is Exact Suppressed ✔ Should return `200` with Exact Suppressed contact Result Check If Contact is Fuzzy Suppressed ✔ Should return `200` with Fuzzy Suppressed contact Result Check If Contact is suppression ✔ Should return `500` with `Could Not Check Suppression` error #fileController - get Return a List of Files Data Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If Filter value is not a object ✔ Should return `400` with `Bad Request` error Check If Sort value is not a object ✔ Should return `400` with `Bad Request` error Check If the Filter value is inCorrect when getting only sharedFile data ✔ Should return `400` with `Bad Request` error Check If the Sort value is inCorrect when getting only sharedFile data ✔ Should return `400` with `Bad Request` error Check If ProjectId is empty When getting a list project wise ✔ Should return `400` with `Bad Request` error Check If get any errors while getting All File data Using the service function ✔ Should return `500` with error message Check If get any errors while getting Only Shared File data Using the service function ✔ Should return `500` with error message Check If the return All File data list is correct ✔ Should return `200` with List of File Data Check If the return Only Shared File data list is correct ✔ Should return `200` with List of Shared File Data #fileController - getFileFacets Get File Unique fields Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If "field" is invalid ✔ Should return `400` with `Bad Request` error if field is not found ✔ Should return `400` with `Bad Request` error if field is not defined Check if correct params are passed ✔ Should return `200` with unique list of File Clients data ✔ Should return `200` with unique list of File Users data Check if correct params are passed ✔ Should return `500` when some internal error occurs in getClients ✔ Should return `500` when some internal error occurs in getCreatedBy #fileController - deleteFileById Deleting a SharedFile from DB table using File ID Check if User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check if FileId is invalid ✔ Should return `400` with `Bad Request` error Check if any error is caught while deleting File using the service function ✔ Should return `500` with error message Check if File deleted successfully ✔ Should return `200` #jobController - put Updates The Job Status When User Authentication Fail ✔ Should return `401` When User Unauthorized Fail ✔ Should return `403` When `projectId` is Missing in Request Param ✔ Should Return 400 When `jobId` is Missing in Request Param ✔ Should Return 400 When Unknown Job Status Received ✔ Should Return Response 400 When `Cancelled` Job Status Received ✔ Should Return Response 200 When `Verified` Job Status Received ✔ Should Return Response 200 #taskAllocationTempController - get Return a List of Task Allocation Temp Data of a Project Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If JobId is invalid ✔ Should return `400` with `Bad Request` error Check If get any errors while getting TaskAllocationTemp data Using the service function ✔ Should return `500` with error message Check If the return taskAllocationTemp data list is correct ✔ Should return `200` with List of Task Allocation Temp Data #taskAllocationTempController - delete Deleting a TaskAllocationTempData from DB table using TaskAllocationTempData ID Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If JobId is invalid ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempId is invalid ✔ Should return `400` with `Bad Request` error Check If get any errors while deleting TaskAllocationTemp data Using the service function ✔ Should return `500` with error message Check if taskAllocationData deleted successfully ✔ Should return `200` #taskAllocationTempController - put Update agent name and ID in taskAllocationTemp data Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If JobId is invalid ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempId is invalid ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData is empty ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData is not a object ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData in agentId is missing ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData in agentName is missing ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData in agentId is not a string ✔ Should return `400` with `Bad Request` error Check If TaskAllocationTempData in agentName is not a string ✔ Should return `400` with `Bad Request` error Check If get any errors while editing TaskAllocationTemp data Using the service function ✔ Should return `500` with error message Check if taskAllocationData edited successfully ✔ Should return `200` #accountsController - post Import Accounts from Master Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for importing accounts from Master ✔ Should return `200` with accounts list Check if correct params are passed for getting list of contacts ✔ Should return `500` when some internal error occurs #projectController - delete Delete Project Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If ProjectName is invalid ✔ Should return `400` with `Bad Request` error Check if user has permissions to delete project ✔ Should return `403` with NO_PROJECT_DELETE_PERMISSION error Check if user has permission to delete a project ✔ Should return `200` when project is deleted successfully Check if correct params are passed for deleting a project ✔ Should return `500` when project deletion fails while checking user permission Check if correct params are passed for deleting a project ✔ Should return `500` when project deletion fails #projectController - get Get all projects Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check if correct params are passed for getting list of contacts ✔ Should return `200` with projects list Check if correct params are passed for getting list of contacts ✔ Should return `500` when some internal error occurs #settingController - put Edit Project Settings Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If ProjectSetting is invalid ✔ Should return `400` with `Bad Request` error Check If contact expiry of ProjectSetting is invalid ✔ Should return `400` with `Bad Request` error Check If status is invalid ✔ should return "400" with "Bad Request" error Check If priority is invalid ✔ should return "400" with "Bad Request" error Check if correct params are passed for editing Project Setting ✔ Should update project settings successfully when no error occurs Check If correct params are passed for editing Project Setting ✔ Should return `500` when something internally fails while removing null keys from an object ✔ Should return `500` when something internally fails while getting status enums ✔ Should return `500` when something internally fails while getting priority enums ✔ Should return `500` when something internally fails while editing Project info ✔ Should return `500` when something internally fails while editing Project setting info ✔ Should return `500` when something internally fails while deleting Project users ✔ Should return `500` when something internally fails while creating Project users #tasksController - post Assign tasks Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If taskAssignData, filter or sort data is wrong ✔ Should return `400` with data validation error Check If get any errors while assign task Using the service function ✔ Should return `500` with error message Check If task assign successfully ✔ Should return `200` #tasksController - getAllTaskStatsOfAProject Get Tasks Stats Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check if correct params are passed ✔ Should return `200` with task stats data Check if correct params are passed ✔ Should return `500` when some internal error occurs #tasksController - getTaskUniqueFields Get Task Unique fields Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If "field" is invalid ✔ Should return `400` with `Bad Request` error Check if correct params are passed ✔ Should return `200` with unique list of Task Disposition data ✔ Should return `200` with unique list of Task users data Check if correct params are passed ✔ Should return `500` when some internal error occurs in getTaskDispositions ✔ Should return `500` when some internal error occurs in getTaskUsers #tasksController - get Get all tasks Check If User is Unauthorized ✔ Should return `401` with `Unauthorized` error Check If ProjectId is invalid ✔ Should return `400` with `Bad Request` error Check If filter is invalid ✔ Should return `400` with `Bad Request` error Check If filter data is wrong ✔ Should return `400` with data validation error Check If sort is invalid ✔ Should return `400` with `Bad Request` error Check If sort data is wrong ✔ Should return `400` with data validation error Check If the User role is invalid ✔ Should return `403` with `User Forbidden` error Check if correct params are passed for getting list of tasks for manager ✔ Should return `200` with tasks list for manager Check if correct params are passed for getting list of tasks for agent ✔ Should return `200` with tasks list for agent Check if correct params are passed for getting list of contacts for manager ✔ Should return `500` when some internal error occurs Check if correct params are passed for getting list of contacts for agent ✔ Should return `500` when some internal error occurs #accountService - checkAccountSuppressionAndDuplicate Returns A Duplicate or Suppressed Check Result Of Given Account Check the given account is duplicate ✔ Should return a duplicate Check result of given Account ✔ Should return a suppressed Check result of given Account #accountService - updateAccount Returns A Updated Account Instance Check Input Account is given or not ✔ Should return error `BAD_ACCOUNT_DATA` with `Could Not Update Account,Account Is Missing` Check For Account Instance ✔ Should return error `BAD_ACCOUNT_DATA` with `Could Not Find Account With ID 6087dc463e5c26006f114ddd` ✔ Should return updatedAccountInstance #accountService - editAccount Returns A Updated Account And accountDupSup Result Check accountDedupeKeys [EDIT_ACCOUNT] :: Account Updated, accountId : 6087dc463e5c26006f114ddd ✔ Should return duplicate account [EDIT_ACCOUNT] :: Account Updated, accountId : 6087dc463e5c26006f114ddd ✔ Should return suppressed account #contactsService - extractFieldsFromTemplate Returns the array of contact fields that exist in the contact form template Check If ContactForm config data does not exist in a project template ✔ Returns an Empty Array Check If ContactForm config data exist in a project template ✔ Returns an Array of contact fields #contactsService - checkContactReuse Returns a contact that already exists in DB Check If getting some errors in sanitizing contact data ✔ Throws an error Check If templateId is Empty When user try to getting contact from DB ✔ Throws an error Check If getting some errors in getting contact from DB for matchType ✔ Throws an error Check If getting some errors in getting template from DB for matchWith data ✔ Throws an error Check If getting some errors in extracting contact fields from template for matchWith data ✔ Throws an error Check If getting some errors in getting contact from DB for matchWith data ✔ Throws an error #accountFinder - findAccount Return a Account Of Given Id Check If AccountId is invalid ✔ Should return `accountId is required` with `BAD_ACCOUNT_ID` error Check If get some errors while getting data from DB ✔ Should return sequelize database error Find Account By Id ✔ Should return account found with ID Find Account By Id ✔ Should return null #checkAccount - check Return an Account with Duplicate And Suppression Result Of Given Account Check For Account exists in database or not ✔ Should return a error `BAD_ACCOUNT_ID` with `Could Not Find Account with ID: 6087dc463e5c26006f114ddd`, Account Reference Dose Not Exist` Check the given account is duplicate ✔ should return duplicateCheckResult ✔ should return `DEDUPE_CHECK_ERROR` with `Could Not Check Account, Something Went wrong while Dedupe Check` Check the given account is suppressed ✔ should return suppressionCheckResult ✔ should return `SUPPRESSION_CHECK_ERROR` with `Could Not Check Account, Something Went wrong while Suppression Check` #checkContact - check should return a contact is duplicate or suppressed when contact with id is passed but contactInstance is not found by contactFinder ✔ should return a error with code BAD_CONTACT_ID when duplicate contact is passed ✔ should return a matched duplicate contact instance when duplicateChecker.findContactDuplicate() throws error ✔ should return a error with code DEDUPE_CHECK_ERROR when exact suppressed contact is passed ✔ should return a matched suppressed contact instance when fuzzy suppressed contact is passed ✔ should return a fuzzy suppressed contact instance when suppressionChecker.findContactSuppression() throws error ✔ should return a error with code SUPPRESSION_CHECK_ERROR when contact is neither duplicate or suppressed ✔ should return a given contact instance #contactFinder - findContact should return a contactInstance of given contactId When ContactId Is Undefined ✔ Should return a error BAD_CONTACT_ID When Sequelize Query Fails ✔ Should return a sequelize error When Contact Id Is Valid ✔ Should return a contactInstance for given contactId When Contact Id Is Valid ✔ Should return a null for given contactId #duplicateChecker - findContactDuplicate Returns a Duplicate Contact When no params are passed ✔ Should return a false When Contact Email Passed ✔ Should return a duplicateMatchCase: EMAIL When Contacts If emailDedupeKey Passed ✔ Should return a duplicateMatchCase: emailDedupeKey When Contacts If phoneDedupeKey Passed ✔ Should return a duplicateMatchCase: phoneDedupeKey When Contacts If companyDedupeKey Passed ✔ Should return a duplicateMatchCase: companyDedupeKey When Contacts If Passed ✔ Should return a duplicateMatchCase: NONE #duplicateChecker - findAccountDuplicate Validates findAccountDuplicate When Account if no params are passed ✔ Should return a false When Account Domain Is Passed ✔ Should return a duplicateMatchCase: WEBSITE_DOMAIN When Account ScrubbedName Is Passed ✔ Should return a duplicateMatchCase: SCRUBBED_COMPANY_NAME When Account AliasName Is Passed ✔ Should return a duplicateMatchCase: COMPANY_ALIAS_NAME When Account Tokens Is Passed ✔ Should return a duplicateMatchCase: TOKENS When Account Is Not Passed ✔ Should return a duplicateMatchCase: NONE #suppressionChecker - findAccountSuppression Should Return A Suppressed Account When no params are passed ✔ Should return a false When Account Domain Is Passed ✔ Should return a suppressionMatchCase: WEBSITE_DOMAIN When Account ScrubbedName Is Passed ✔ Should return a suppressionMatchCase: SCRUBBED_COMPANY_NAME When Account AliasName Is Passed ✔ Should return a suppressionMatchCase: COMPANY_ALIAS_NAME When Account Tokens Is Passed ✔ Should return a suppressionMatchCase: TOKENS When Account Is Passed ✔ Should return a suppressionMatchCase: NONE When sharedFileLinkData Sequelize Query Fails ✔ Should return a sequelize error When accountSuppressionFindOne Sequelize Query Fails ✔ Should return a sequelize error #suppressionChecker - findContactSuppression Should Return A Exact-ContactSuppression When no params is passed ✔ Should return a false When Contact Is Passed With email ✔ Should return a suppressionMatchCase: EMAIL When Contact Is Passed With emailDedupeKey ✔ Should return a suppressionMatchCase: emailDedupeKey When Contact Is Passed With phoneDedupeKey ✔ Should return a suppressionMatchCase: phoneDedupeKey When Contact Is Passed With companyDedupeKey ✔ Should return a suppressionMatchCase: companyDedupeKey When Contact Is Passed ✔ Should return a suppressionMatchCase: NONE When sharedFileProjectFindAll Sequelize Query Fails ✔ Should return a sequelize error When contactSuppressionFindOne Sequelize Query Fails ✔ Should return a sequelize error Should Return A Fuzzy-ContactSuppression When Contact including lastName Is Passed ✔ Should return a fuzzyMatchCase: LN+EMAIL_DOMAIN When Contact including firstName Is Passed ✔ Should return a fuzzyMatchCase: FN+EMAIL_DOMAIN When Contact Is Passed ✔ Should return a fuzzyMatchCase: NONE #paginationService - paginate Get limit and offset based on pageNo and pageSize Generates limit and offset ✔ Should return limit and offset when correct params are passed #validationService - removeNullKeysInObj Removes key with null values from the object ✔ Should remove all the properties having null values from the object #validationService - validateObj Validates the object ✔ Should return the array of mandatory properties that are missing in an object #accountsService - getFileIsLarger Check the size of records for download process selection Check the size of the requested payload with the maximum records downloadable with synchronous process ✔ Should return "true" when requested payload size is greater than maximum records ✔ Should return "false" when requested payload size is less than maximum records ✔ Should throw error when something internally fails Validate contact count data query ✔ Should verify if query payload is valid #accountsService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #accountsService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during sync download ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while creating file in DB #accountsService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #accountsService - downloadAllAccount Downloads accounts or submits jobs for downloading accounts Process accounts download request ✔ Should correctly process and download accounts when async download is disabled ✔ Should correctly process and enqueue job when async download is enabled ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download ✔ Should throw error when something internally fails while accounts exports for sync download #accountsService - getAllAccount Get accounts list with total count of accounts Get accounts and its total counts ✔ Should return accounts and total count ✔ Should throw error when something internally fails while finding account with its total count Validate account find and count all data query ✔ Should verify if query payload is valid #contactsService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #contactsService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during sync download ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while creating file in DB #contactsService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #contactsService - downloadAllContact Downloads contacts or submits jobs for downloading contacts Process contacts download request ✔ Should correctly process and download contacts when async download is disabled ✔ Should correctly process and enqueue job when async download is enabled ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download ✔ Should throw error when something internally fails while contacts exports for sync download #fileService - deleteMasterFileById Deleting a master file using File ID Check if errors are caught while deleting a master file from GCP as well as DB ✔ Should throw error when something internally fails while getting master file ✔ Should throw error when master file not get from DB ✔ Should throw error when something internally fails while deleting master file from DB ✔ Should throw error when Storage Bucket File Exists method fails while deleting a file ✔ Should throw error when Storage Bucket File Delete method fails while deleting a file Check if a master file is deleted from GCP as well as DB ✔ Should return file id of deleted master file #fileService - getMasterFileById Get File Fetch File from DB ✔ Should return File when correct params are passed ✔ Should throw error when something internally fails while getting file #fileService - deleteMasterFilesInfoFromDB Delete File Info Form DB Delete all file related info from DB ✔ Should successfully delete all files info from DB ✔ Should throw error when something internally fails while deleting job errors ✔ Should throw error when something internally fails while deleting jobs ✔ Should throw error when something internally fails while deleting file chunks ✔ Should throw error when something internally fails while deleting file #fileService - createMasterFile Create a master file Create a file to GCP as well as in DB along with its info ✔ should create a master file on GCP as well as in DB along with its info Check if errors are caught while creating a master file in GCP as well as DB ✔ Should throw error when Storage Bucket File get signed URl method fails while creating master file in GCP ✔ Should throw error when something internally fails while creating master file in DB ✔ Should throw error when something internally fails while creating master file job in DB #fileService - createMasterFileInDB Create a file Create a file in DB ✔ Should create a file in DB when correct params are passed ✔ Should throw error when something internally fails while creating a file in db #fileService - createMasterJobInDB Create a job Create a job in DB ✔ Should create a job in DB when correct params are passed ✔ Should throw error when something internally fails while creating a job in db #jobsService - getJobById Fetches a job Get a job using id ✔ Should return a job having the id ✔ Should throw error when something internally fails while getting the job jobsService - convertToCSVFormat Removes unnecessary props and returns json object ✔ Should correctly return json object of a row jobsService - getMasterJobErrors Fetches job errors list Get all job errors ✔ Should return job errors list ✔ Should throw error when something internally fails while getting the job jobsService - getAllMasterJobs Get lists of jobs Fetches list of jobs based on job type ✔ Should return only upload types of jobs list when 'upload' job type is specified ✔ Should return only download types of jobs list when 'download' job type is specified ✔ Should return only upload types of jobs list when 'upload' job type is specified ✔ Should return only upload types of jobs list when 'upload' job type is specified ✔ Should return only upload types of jobs list when 'upload' job type is specified ✔ Should return only upload types of jobs list when 'upload' job type is specified ✔ Should throw error when something internally fails while finding jobs with its total count #autoCompleteService - search Fetches filtered list of results ✔ should return list as it is when no param is specified ✔ should return filtered list as it is when param is specified ✔ should return filtered list as it is when param and comparisonKey are specified #autoCompleteService - filterDataDictionary Fetches filtered list of results ✔ should return list as it is when no param and filter by are specified ✔ should return only filter by list when only filter by is specified Fetches filtered list of results as per params ✔ should return only filter by list containing param when filter by and param is specified ✔ should throw error when something internally fails while filtering data dictionary TechnologyService getTechnologies ✔ should return an empty array if no userParam is provided ✔ should return an array of technology names when userParam is provided ✔ should handle case-insensitive search ✔ should return empty array if no matching technologies found #verifyAccountsService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #verifyAccountsService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #verifyAccountsService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while creating file in DB #verifyAccountsService - downloadAllAccount Downloads accounts or submits jobs for downloading accounts Process accounts download request ✔ Should correctly process and download accounts ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download #verifyAccountsService - getAllAccount Get verify accounts list with total count of accounts Get verify accounts and its total counts ✔ Should return verify accounts and total count ✔ Should throw error when something internally fails while finding verify account with its total count Validate verify account find and count all data query ✔ Should verify if query payload is valid #verifyAccountsService - createAccount Create or update a verify account based on findAccount result Upsert a verify account ✔ Should throw error when account is not passed ✔ Should throw error when find account internally fails [CREATE_VERIFY_ACCOUNT] :: Account Created, accountDomain : nexsales.com ✔ Should create a new verify account when no existing verify account is found ✔ Should throw error when something internally fails while creating a verify account [CREATE_VERIFY_ACCOUNT] :: Account Updated, accountDomain : nexsales.com ✔ Should update verify account when existing verify account is found [CREATE_VERIFY_ACCOUNT] :: Account Updated, accountDomain : nexsales.com ✔ Should throw error when something internally fails while saving verify account #verifyAccountsService - findAccount Fetch a verify account Get a verify account based on domain ✔ Should throw error when domain is not passed ✔ Should throw error when something internally fails while finding a verify account ✔ Should return a verify account when it is found ✔ Should return null when it is not found #verifyAccountsService - saveAccount Save a verify account Save a verify account based on domain ✔ Should save a verify account successfully ✔ Should throw error when something internally fails while sanitizing ✔ Should throw error when something internally fails while converting format ✔ Should throw error when something internally fails while creating a verify account #verifyAccountsService - convertFormatAccount Convert format of an account ✔ Should covert format for various fields of an account #accountsService - getAccountStats Get Account Stats Get account stats data ✔ Should get account stats when correct params are passed ✔ Should throw error when something internally fails while getting dispositions counts ✔ Should throw error when something internally fails while getting stages counts #accountsService - getAllAccountDispositions Get Account stats dispositions count Get account stats dispositions with count data ✔ Should get account stats dispositions with count when correct params are passed ✔ Should throw error when something internally fails Validate account dispositions stats data query ✔ Should verify if query payload is valid #accountsService - getAllAccountStages Get account stats getAllAccountStages count Get account stats getAllAccountStages with count data ✔ Should get account stats getAllAccountStages with count when correct params are passed ✔ Should throw error when something internally fails Validate account stages stats data query ✔ Should verify if query payload is valid #accountsService - getAccountDispositions Returns list of unique Account dispositions (Facets) When Account Dispositions are found ✔ Should return array of dispositions Validate if the query arguments are valid ✔ Should verify query arguments for DB operation ✔ Should throw error when something internally fails #accountsService - getFileIsLarger Check the size of records for download process selection Check the size of the requested payload with the maximum records downloadable with synchronous process ✔ Should return "true" when requested payload size is greater than maximum records ✔ Should return "false" when requested payload size is less than maximum records ✔ Should throw error when something internally fails Validate contact count data query ✔ Should verify if query payload is valid #accountsService - downloadAllAccount Downloads accounts or submits jobs for downloading accounts Process accounts download request ✔ Should correctly process and download accounts when async download is disabled ✔ Should correctly process and enqueue job when async download is enabled ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download ✔ Should throw error when something internally fails while accounts exports for sync download #accountsService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #accountsService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #accountsService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during sync download ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while generating file name ✔ Should throw error when something internally fails while getting project name ✔ Should throw error when something internally fails while creating file in DB #accountsService - getProjectName Get project name Fetch name of a project ✔ Should return name of project when correct params are passed ✔ Should throw error when something internally fails while getting project name #accountsService - getAllAccount Get accounts list with total count of accounts Get accounts and its total counts ✔ Should return accounts and total count ✔ Should throw error when something internally fails while finding account ✔ Should throw error when something internally fails while getting accounts count Validate account find and count all data query ✔ Should verify if query payload is valid #accountsService - generateFileNameBasedOnFilter Generate File name Returns file name based on filters passed ✔ Should return compliance file name when stage filter is other than "Ready" and "In Progress" ✔ Should return deliverable file name when stage filter is "Ready" ✔ Should return in progress file name when stage filter is "In Progress" #contactsService - getAllContactStats Get Contact Stats Get contact stats data ✔ Should get contacts stats when correct params are passed ✔ Should throw error when something internally fails while getting researchStatus counts ✔ Should throw error when something internally fails while getting stages counts #contactsService - getAllContactResearchStatus Get Contact stats researchStatus count Get contact stats researchStatus with count data ✔ Should get contact stats researchStatus with count when correct params are passed ✔ Should throw error when something internally fails Validate contact researchStatus stats data query ✔ Should verify if query payload is valid #contactsService - getAllContactStages Get Contact stats getAllContactStages count Get contact stats getAllContactStages with count data ✔ Should get contact stats getAllContactStages with count when correct params are passed ✔ Should throw error when something internally fails Validate contact stages stats data query ✔ Should verify if query payload is valid #contactsService - getContactDispositions Returns list of unique Contact dispositions (Facets) When Contact Dispositions are found ✔ Should return array of dispositions Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #contactsService - getContactUpdatedBy Returns list of unique Contact updatedBy fields (Facets) When Contact UpdatedBy are found ✔ Should return array of Users Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #contactService - getFileIsLarger Check the size of records for download process selection Check the size of the requested payload with the maximum records downloadable with synchronous process ✔ Should return "true" when requested payload size is greater than maximum records ✔ Should return "false" when requested payload size is less than maximum records ✔ Should throw error when something internally fails Validate contact count data query ✔ Should verify if query payload is valid #contactsService - downloadAllContact Downloads contacts or submits jobs for downloading contacts Process contacts download request ✔ Should correctly process and download contacts when async download is disabled ✔ Should correctly process and enqueue job when async download is enabled ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download ✔ Should throw error when something internally fails while contacts exports for sync download #contactService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during sync download ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while getting project name ✔ Should throw error when something internally fails while creating file in DB #contactService - getAllContact Get contacts list with total count of contacts Get contacts and its total counts ✔ Should return contacts and total count ✔ Should throw error when something internally fails Validate contact find and count all data query ✔ Should verify if query payload is valid #contactService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #contactService - getProjectName Get project name Fetch name of a project ✔ Should return name of project when correct params are passed ✔ Should throw error when something internally fails while getting project name #contactService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #contactService - checkContactSuppressionAndDuplicate Returns a contactDupSupResult for given contact When given contact is duplicate ✔ Should return a contactDupSupResult matchType DUPLICATE When given contact is Exact_Suppressed ✔ Should return a contactDupSupResult matchType EXACT_SUPPRESSED When given contact is Fuzzy_Suppressed ✔ Should return a contactDupSupResult matchType FUZZY_SUPPRESSED #fileService - getAllFile Returns list of All File data Check If get some errors while getting file data from DB ✔ Should throw error Check If get some errors while getting shardFile data from DB ✔ Should throw error Check If get all file data from DB ✔ Should return list of All file data #fileService - getAllSharedFile Returns list of Shared File data and Count of total Shared Files Check If get some errors while counting shared files from DB ✔ Should throw error Check If get some errors while getting sharedFile data from DB ✔ Should throw error Check If get all shared file data and count of shared files from DB ✔ Should return list of Shared File data and Count of total Shared Files #fileService - getClients Returns list of unique File Clients (Facets) When File Clients are found ✔ Should return array of clients Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #fileService - getCreatedBy Returns list of unique File createdBy fields (Facets) When File createdBy are found ✔ Should return array of Users Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #fileService - deleteFile Deleting a SharedFile from DB table using File ID Check if errors are caught while deleting data from DB ✔ SharedFile delete should return error ✔ File delete should return error Check if File is deleted from DB ✔ Should return deleted SharedFile ✔ Should return deleted File #fileService - getFileById Get File Fetch File from DB ✔ Should return File when correct params are passed ✔ Should throw error when something internally fails while getting file Fetch SharedFile from DB ✔ Should return SharedFile when correct params are passed ✔ Should throw error when something internally fails while getting file #fileService - getJobByFileId Get Job by File Id Fetch Job from DB using SharedFile Id ✔ Should return Job when correct params are passed ✔ Should throw error when something internally fails while getting file Fetch Job from DB using File id ✔ Should return Job when correct params are passed ✔ Should throw error when something internally fails while getting file #fileService - deleteSuppressionJobErrors Deleting a JobError from DB table using Job ID Check If get some errors while deleting data from DB ✔ JobError delete should return error Check if JobError is deleted from DB ✔ Should return deleted JobError #fileService - deleteSuppressionFileJob Deleting a Job from DB table using Shared File ID Check If get some errors while deleting data from DB ✔ Job delete should return error Check if Job is deleted from DB using Shared File ID ✔ Should return deleted Job Deleting a Job from DB table using File ID Check If get some errors while deleting data from DB ✔ Job delete should return error Check if Job is deleted from DB using File ID ✔ Should return deleted Job #fileService - deleteSuppressionFileChunks Deleting a FileChunk from DB table using Shared File ID Check If get some errors while deleting data from DB ✔ FileChunk delete should return error Check if FileChunk is deleted from DB using Shared File ID ✔ Should return deleted FileChunk Deleting a FileChunk from DB table using File ID Check If get some errors while deleting data from DB ✔ FileChunk delete should return error Check if FileChunk is deleted from DB using File ID ✔ Should return deleted FileChunk #fileService - deleteSuppressionRecords Deleting a Suppression File from DB table using File ID Check if errors are caught while deleting data from DB ✔ Should throw error when getJobByFileId fails while deleting a file ✔ Should throw error when deleteSuppressionJobErrors fails while deleting a file ✔ Should throw error when contactSuppressionDestroy fails while deleting a file ✔ Should throw error when accountSuppressionDestroy fails while deleting a file ✔ Should return error if Job status is processing ✔ Should return error if Job Operation name is not defined #fileService - deleteFileById Deleting a File from DB table using File ID Check if errors are caught while deleting data from DB ✔ Should throw error when getFileById fails while deleting a file ✔ Should throw error when file if not get from DB ✔ Should throw error when Storage Bucket File Exists method fails while deleting a file ✔ Should throw error when Storage Bucket File Delete method fails while deleting a file ✔ Should return error if File Type is not defined Check if File is deleted from DB ✔ Should delete File data from DB when type is "SUPPORTING_DOCUMENT" ✔ Should delete File data from DB when type is "SUPPRESSION" Check if File is deleted from Cloud Storage ✔ Should delete File data from Cloud Storage #fileService - deleteAllFilesOfAProject Delete all files from GCP of a project Delete a project files from GCP ✔ Should successfully delete all files of a project from GCP ✔ Should throw error when something internally fails while getting list of files for a project ✔ Should return undefined when gcp storage operation fails while deleting all files of a project from GCP AccountService createJob ✔ should create a job createFile ✔ should create a file enqueue ✔ should enqueue a task #projectService - checkUserPermission Check permission availablility Check permission for an user for deleting project ✔ Should return no permission available When the operation "DELETE" is not passed ✔ Should return no permission available When no project user is available ✔ Should return no permission available When no project is available ✔ Should return permission available When both project and user at level "owner_main" for that project are available ✔ Should throw error when something internally fails while getting project user ✔ Should throw error when something internally fails while getting project #projectService - editProject Update project info Modify project info ✔ Should correctly update project info when correct params are passed ✔ Should throw error when something internally fails while updating project info #projectService - getAllProjectWithSettings Get projects list with total count of projects Get projects and its total counts ✔ Should return contacts and total count ✔ Should throw error when something internally fails while find all projects ✔ Should throw error when something internally fails while counting all projects Validate find all and count data query ✔ Should verify if query payload is valid when attributes list is passed ✔ Should verify if query payload is valid when no attributes is passed settingService - getStatusEnums Returns status list ✔ Should return list of status settingService - getPriorityEnums Returns priority list ✔ Should return list of priority settingService - editProjectSetting Update project settings info Modify project settings info ✔ Should throw error when no project settings is found ✔ Should update project setting successfully when correct params are passed ✔ Should throw error when instance saving fails internally ✔ Should throw error when someting fails internally while updating accounts potential counts ✔ Should not update accounts potential counts when contacts per account does not change settingService - updateAccountsPotentialCountsOfAProject Update potential counts of a project Modify potential counts of all accounts of a project ✔ Should successfully update potential counts of all accounts of a project when correct params are passed ✔ Should handle thrown error when something internally fails while setting project id ✔ Should handle thrown error when something internally fails while calculation account potential for all accounts of a project #tasksService - validateTasksAssignData Validate assigned tasks data Check taskTypeId ✔ Should throw error when a taskTypeId is Empty Check tasks allocation strategy ✔ Should throw error when an invalid task allocation strategy is specified Validate block size if task allocation strategy is `Block` ✔ Should throw error when an invalid block size is specified ✔ Should throw error when block size is less than 1 Check limit assignment ✔ Should throw error when an invalid limit assignment is specified Validate limit size if limit assignment is `Assign Top` ✔ Should throw error when an invalid limit size is specified ✔ Should throw error when limit size is less than 1 Validate allocation type ✔ Should throw error when an invalid allocation type is specified Validate agents for task allocation ✔ Should throw error when an invalid agents value is specified ✔ Should throw error when no agents value is specified Validate filter and sort value if allocationOf value is a `task` ✔ Validated filter and sort successfully Validate filter and sort value if allocationOf value is a `account` ✔ Validated filter and sort successfully Validate filter and sort value if allocationOf value is a `contact` ✔ Validated filter and sort successfully #tasksService - checkTaskAllocationIsInProgress Check task allocation process is inProgress for given projectId Check If get some errors while find inProgress task allocation process from DB ✔ Should throw error Check If the task allocation process is inProgress ✔ Should throw error Check If the task allocation process is not an inProgress ✔ Should not throw an error #tasksService - getProjectName Return project name of given projectId Check If get some errors while find project from DB ✔ Should throw error Check if the project is not found in DB ✔ Should throw error with error message `Project not Found` Check if the project is found in DB ✔ Should return projectName #tasksService - tasksAssign Starts the process of assigning tasks Check task allocation process is inProgress for given projectId ✔ Should throw error Check If get some errors while getting the project name using projectId ✔ Should throw error Check If get some errors while adding file data in DB ✔ Should throw error Check If get some errors while adding the task assign process in the queue ✔ Should throw error Check If the task assign process starts successfully when the allocationOf value is `task` ✔ Should return success message `Task Assign job added Successfully` Check If the task assign process starts successfully when the allocationOf value is `account` ✔ Should return success message `Task Assign job added Successfully` Check If the task assign process starts successfully when the allocationOf value is `contact` ✔ Should return success message `Task Assign job added Successfully` #tasksService - getAllTaskStatsOfAProject Get Tasks Stats For A Project Get task stats data for a project ✔ Should get tasks stats for a project when correct params are passed ✔ Should throw error when something internally fails Validate task stats data for a project query ✔ Should verify if query payload is valid #tasksService - getTaskDispositions Returns list of unique Task dispositions (Facets) When Task Dispositions are found ✔ Should return array of dispositions Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #tasksService - getTaskUsers Returns list of unique Contact updatedBy fields (Facets) When Contact UpdatedBy are found ✔ Should return array of Users Validate if the query arguments are valid ✔ Should throw error when something internally fails ✔ Should verify query arguments for DB operation #tasksService - addFile Adds File to DB File creation in DB ✔ Should successfully create a file when all correct params are passed during sync download ✔ Should successfully create a file when all correct params are passed during async download ✔ Should throw error when something internally fails while generating file name ✔ Should throw error when something internally fails while getting project name ✔ Should throw error when something internally fails while creating file in DB #tasksService - downloadAllTask Downloads tasks or submits jobs for downloading tasks Process tasks download request ✔ Should correctly process and download tasks when async download is disabled ✔ Should correctly process and enqueue job when async download is enabled ✔ Should throw error when something internally fails while adding file ✔ Should throw error when something internally fails while enqueueing task for async download ✔ Should throw error when something internally fails while tasks exports for sync download #tasksService - updateJobStatus Update job status Update status based on job result ✔ Should update job status correctly Could not update a Job Status: {JobId: 01,Error: Error: Something went wrong} ✔ Should throw error when something internally fails while updating job #tasksService - getFileIsLarger Check the size of records for download process selection Check the size of the requested payload with the maximum records downloadable with synchronous process ✔ Should return "true" when requested payload size is greater than maximum records ✔ Should return "false" when requested payload size is less than maximum records ✔ Should throw error when something internally fails Validate contact count data query ✔ Should verify if query payload is valid without any filters ✔ Should verify if query payload is valid with "stage" filter ✔ Should verify if query payload is valid with "complianceStatus" filter ✔ Should verify if query payload is valid with filters other than "complianceStatus" and "stage" #tasksService - enqueue Enqueue task in the queue Adds the task to the queue for process ✔ Should enqueue task when correct params are passed Adds the task to the queue for process ✔ Should throw error when something internally fails while enqueueing task #tasksService - getAllTaskForManager Get tasks list with total count of tasks Get tasks and its total counts ✔ Should return tasks and total count ✔ Should throw error when something internally fails Validate tasks find and count all data query ✔ Should verify if query payload is valid #tasksService - generateFileNameBasedOnFilter Generate File name Returns file name based on filters passed ✔ Should return all tasks file name when no filter is applied ✔ Should return today tasks file name when filter applied is data range todays date ✔ Should return compliance tasks file name when filter applied is stage as compliance ✔ Should return non-compliant tasks file name when filter applied is compliance status as non-compliant ✔ Should return filtered tasks file name when filter applied is other than "updatedAt" todays date, "contactStage" as compliance and "contactComplianceStatus" as non-compliant #tasksService - getAllTaskForAgent Get tasks list for agent Get tasks and its total counts ✔ Should return tasks and total counts When count only option is disabled ✔ Should return counts When count only option is enabled ✔ Should throw error when something internally fails while getting task stats ✔ Should throw error when something internally fails while getting tasks ✔ Should throw error when something internally fails while building order clause ✔ Should throw error when something internally fails while building where clause #tasksService - getTaskStats Get tasks count Fetch tasks count for different status ✔ Should return tasks counts ✔ Should return tasks counts with upcoming, overdue and working count as "0" when status is "Completed" ✔ Should return tasks counts with upcoming, overdue and completed count as "0" when status is "Working" ✔ Should return tasks counts with working and completed count as "0" when status is "Pending" ✔ Should throw error when something internally fails while getting counts ✔ Should call task count function only 5 times #tasksService - fetchAllTask Get tasks list with total count of tasks Get tasks and its total counts ✔ Should return tasks and total count ✔ Should throw error when something internally fails Validate tasks find and count all data query ✔ Should verify if query payload is valid #tasksService - buildOrderClause Build order clause for sorting ✔ Should return default sort when no sorting is applied ✔ Should return accountName sort when accountName sorting is applied ✔ Should return accountWebsite sort when accountWebsite sorting is applied ✔ Should return accountDisposition sort when accountDisposition sorting is applied ✔ Should return qualifiedContacts sort when qualifiedContacts sorting is applied ✔ Should return potential sort when potential sorting is applied ✔ Should return taskCreatedAtDate sort when taskCreatedAtDate sorting is applied ✔ Should return taskDueDate sort when taskDueDate sorting is applied ✔ Should return taskPriority sort when taskPriority sorting is applied ✔ Should return first sort when multiple fields sorting is applied #tasksService - customOrder Generates ordering for fields with custom values ✔ Should return sort for fields with custom values #tasksService - buildWhereClause Generates where clause Generates where obect based on filter properties ✔ Should return empty where object When no filter is provided ✔ Should return empty where object When even filter is provided and no conditions fulfil ✔ Should return where object with updatedAt When updatedAt filter is provided for manager ✔ Should return account where object with name When account name filter is provided for agent ✔ Should return account where object with website When account website filter is provided for agent ✔ Should return account where object with disposition When account disposition filter is provided for agent ✔ Should return account where object with employeeSize When account employeeSize filter is provided for agent ✔ Should return account where object with revenue When account revenue filter is provided for agent ✔ Should return account where object with qualifiedContacts When account qualifiedContacts filter is provided for agent ✔ Should return account where object with potential When account potential filter is provided for agent ✔ Should return where object with priority When task priority filter is provided for agent ✔ Should return where object with priority When taskType type filter is provided for agent ✔ Should throw error when something internally fails while building where clause for status #tasksService - buildWhereClauseForStatus Generate status where clause Generate where object for the status filter ✔ Should return empty where object when the status is empty ✔ Should return where object for "completed" status when the status filter is "completed" ✔ Should return where object for "working" status when the status filter is "working" ✔ Should return where object for "pending" status when the status filter is "pending" ✔ Should return where object for "overdue" status and dueDate when the status filter is "overdue" ✔ Should return where object for "upcoming" status and dueDate when the status filter is "upcoming" ✔ Should return where object for "overdue" and "upcoming" status when the status filter are "overdue" and "upcoming" ✔ Should return where object for multiple status when the status filter are multiple ✔ Should return where object with empty array value when the status filter is other than "upcoming", "overdue", "completed" and "working" userService - deleteProjectUser Delete all users of a project Destroy a project users ✔ Should successfully destroy all users of a project when correct params are passed ✔ Should throw error when something internally fails while deleting all users of a project AutoCompleteService #search ✔ should return matching elements from array ✔ should return matching elements from array of objects #filterDataDictionary ✔ should return filtered data based on param ✔ should return filtered data based on param and data FileStreamService #getWriteStream ✔ should create a write stream with correct options ProjectTypeCRUDService Constructor ✔ should initialize config and logger properties getAllProjectType ✔ should fetch all project types successfully ✔ should handle errors when fetching project types 765 passing (2s) ---------------------------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------- All files | 89.29 | 73.57 | 91.81 | 89.44 | app | 100 | 100 | 100 | 100 | constant.js | 100 | 100 | 100 | 100 | app/controllers/v1/clients/contacts | 100 | 94.28 | 100 | 100 | contactsController.js | 100 | 94.28 | 100 | 100 | 73,90 app/controllers/v1/master/accounts | 75.81 | 71.15 | 45.45 | 75.81 | accountsController.js | 75.81 | 71.15 | 45.45 | 75.81 | ...14-617,657-658 app/controllers/v1/master/contacts | 66.66 | 68.29 | 60 | 66.66 | contactsController.js | 66.66 | 68.29 | 60 | 66.66 | ...04,420,433-456 app/controllers/v1/master/files | 100 | 78.57 | 100 | 100 | filesController.js | 100 | 78.57 | 100 | 100 | ...29-130,187-257 app/controllers/v1/master/jobs | 96.46 | 80 | 100 | 96.46 | jobsController.js | 96.46 | 80 | 100 | 96.46 | 215,231,402-405 app/controllers/v1/master/location | 94.59 | 87.5 | 100 | 94.44 | locationController.js | 94.59 | 87.5 | 100 | 94.44 | 92-96 app/controllers/v1/master/search | 100 | 87.5 | 100 | 100 | naicsCodeController.js | 100 | 87.5 | 100 | 100 | 48 ...controllers/v1/master/technologies | 90.32 | 75 | 100 | 90.32 | technologyController.js | 90.32 | 75 | 100 | 90.32 | 62,70,78 ...ntrollers/v1/master/verifyAccounts | 83.52 | 87.5 | 100 | 83.52 | verifyAccountsController.js | 83.52 | 87.5 | 100 | 83.52 | 186-222,281 app/services/clients/contacts | 83.78 | 52.27 | 100 | 84.93 | contactsService.js | 83.78 | 52.27 | 100 | 84.93 | ...35-136,156-165 app/services/commonServices | 98.84 | 79.84 | 100 | 98.84 | accountFinder.js | 100 | 75 | 100 | 100 | 7-8 buildDedupeKeys.js | 100 | 65.62 | 100 | 100 | ...28,30-31,49-65 checkAccount.js | 92.72 | 55.17 | 100 | 92.72 | 87,131-138 checkContact.js | 100 | 70 | 100 | 100 | 9-45,88,127,166 contactFinder.js | 100 | 75 | 100 | 100 | 7-8 duplicateChecker.js | 100 | 88.23 | 100 | 100 | ...71,149-152,185 sanitizer.js | 100 | 66.66 | 100 | 100 | 8-12 suppressionChecker.js | 100 | 92.68 | 100 | 100 | ...,35-38,166-169 app/services/helpers | 100 | 50 | 100 | 100 | paginationService.js | 100 | 50 | 100 | 100 | 4-8 validationService.js | 100 | 50 | 100 | 100 | 6-10 app/services/master/files | 76.59 | 58 | 87.5 | 76.59 | filesService.js | 76.59 | 58 | 87.5 | 76.59 | ...21-222,241-245 app/services/master/jobs | 89.61 | 71.42 | 100 | 90.78 | jobsService.js | 89.61 | 71.42 | 100 | 90.78 | ...1,83-84,98,285 app/services/master/location | 100 | 50 | 100 | 100 | locationsService.js | 100 | 50 | 100 | 100 | 6-8 app/services/master/search | 100 | 78.57 | 100 | 100 | autoCompleteService.js | 100 | 78.57 | 100 | 100 | 5-9,50 app/services/master/technology | 100 | 75 | 100 | 100 | technologyService.js | 100 | 75 | 100 | 100 | 8-11 app/services/master/verifyAccounts | 84.94 | 54.09 | 100 | 85.4 | verifyAccountsService.js | 84.94 | 54.09 | 100 | 85.4 | ...89-412,445,448 app/services/search | 100 | 75 | 100 | 100 | autoCompleteService.js | 100 | 75 | 100 | 100 | 5-9,41 app/services/stream | 100 | 100 | 100 | 100 | fileStreamService.js | 100 | 100 | 100 | 100 | ---------------------------------------|---------|----------|---------|---------|-------------------