-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Postman tests for project fiscals
- Loading branch information
1 parent
545bf8f
commit ef75817
Showing
1 changed file
with
210 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,133 @@ | |
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Create Project Fiscal", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"// Parse the response JSON", | ||
"const response = pm.response.json();", | ||
"", | ||
"// Check if the access token exists in the response", | ||
"if (response.projectPlanFiscalGuid) {", | ||
" // Save the token to an environment variable", | ||
" pm.environment.set(\"projectPlanFiscalGuid\", response.projectPlanFiscalGuid);", | ||
" console.log(\"Project Fiscl Guid saved successfully!\");", | ||
"} else {", | ||
" console.error(\"Failed to set project Fiscal guid:\", response);", | ||
"}" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
}, | ||
{ | ||
"listen": "prerequest", | ||
"script": { | ||
"exec": [ | ||
"" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "{{accessToken}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"projectGuid\": \"{{projectGuid}}\",\n \"activityCategoryCode\": \"TACT_PLAN\",\n \"fiscalYear\": 2023,\n \"projectPlanStatusCode\": \"ACTIVE\",\n \"planFiscalStatusCode\": \"PLANNED\",\n \"projectFiscalName\": \"Fiscal Project 1\",\n \"projectFiscalDescription\": \"This is a test project fiscal description.\",\n \"businessAreaComment\": \"Test comment\",\n \"estimatedClwrrAllocAmount\": 1000.00,\n \"totalCostEstimateAmount\": 2000.00,\n \"fiscalFundingRequestAmount\": 1500.00,\n \"fiscalAllocatedAmount\": 1200.00,\n \"fiscalAncillaryFundAmount\": 300.00,\n \"fiscalPlannedProjectSizeHa\": 10.5,\n \"fiscalPlannedCostPerHaAmt\": 500.00,\n \"fiscalReportedSpendAmount\": 0.00,\n \"fiscalActualAmount\": 0.00,\n \"fiscalCompletedSizeHa\": 0.0,\n \"fiscalActualCostPerHaAmt\": 0.0,\n \"firstNationsDelivPartInd\": true,\n \"firstNationsEngagementInd\": false,\n \"firstNationsPartner\": \"Test Partner\",\n \"resultsNumber\": \"RN123456\",\n \"resultsOpeningId\": \"RO12345\",\n \"resultsContactEmail\": \"[email protected]\",\n \"submittedByName\": \"Test User\",\n \"submittedByUserGuid\": \"123e4567-e89\",\n \"submittedByUserUserid\": \"testuser\",\n \"submissionTimestamp\": \"2024-01-01T12:00:00Z\",\n \"isApprovedInd\": true,\n \"isDelayedInd\": false\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{LOCAL_API_URL}}/projectFiscals", | ||
"host": [ | ||
"{{LOCAL_API_URL}}" | ||
], | ||
"path": [ | ||
"projectFiscals" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Update Project Fiscal", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
}, | ||
{ | ||
"listen": "prerequest", | ||
"script": { | ||
"exec": [ | ||
"" | ||
], | ||
"type": "text/javascript", | ||
"packages": {} | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "{{accessToken}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "PUT", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"projectPlanFiscalGuid\": \"{{projectPlanFiscalGuid}}\",\n \"projectGuid\": \"{{projectGuid}}\",\n \"activityCategoryCode\": \"RX_DEV\",\n \"fiscalYear\": 2024,\n \"projectPlanStatusCode\": \"ACTIVE\",\n \"planFiscalStatusCode\": \"PLANNED\",\n \"projectFiscalName\": \"Fiscal Project 1\",\n \"projectFiscalDescription\": \"This is a test project fiscal description.\",\n \"businessAreaComment\": \"Test comment\",\n \"estimatedClwrrAllocAmount\": 1000.00,\n \"totalCostEstimateAmount\": 2000.00,\n \"fiscalFundingRequestAmount\": 1500.00,\n \"fiscalAllocatedAmount\": 1200.00,\n \"fiscalAncillaryFundAmount\": 300.00,\n \"fiscalPlannedProjectSizeHa\": 10.5,\n \"fiscalPlannedCostPerHaAmt\": 500.00,\n \"fiscalReportedSpendAmount\": 0.00,\n \"fiscalActualAmount\": 0.00,\n \"fiscalCompletedSizeHa\": 0.0,\n \"fiscalActualCostPerHaAmt\": 0.0,\n \"firstNationsDelivPartInd\": true,\n \"firstNationsEngagementInd\": false,\n \"firstNationsPartner\": \"Test Partner\",\n \"resultsNumber\": \"RN123456\",\n \"resultsOpeningId\": \"RO12345\",\n \"resultsContactEmail\": \"[email protected]\",\n \"submittedByName\": \"Test User\",\n \"submittedByUserGuid\": \"123e4567-e89\",\n \"submittedByUserUserid\": \"testuser\",\n \"submissionTimestamp\": \"2024-01-01T12:00:00Z\",\n \"isApprovedInd\": true,\n \"isDelayedInd\": false\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", | ||
"host": [ | ||
"{{LOCAL_API_URL}}" | ||
], | ||
"path": [ | ||
"projectFiscals", | ||
"{{projectPlanFiscalGuid}}" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "GET Projects", | ||
"request": { | ||
|
@@ -518,6 +645,89 @@ | |
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Get ProjectFiscal", | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "{{accessToken}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", | ||
"host": [ | ||
"{{LOCAL_API_URL}}" | ||
], | ||
"path": [ | ||
"projectFiscals", | ||
"{{projectPlanFiscalGuid}}" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Get ProjectFiscals", | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "{{accessToken}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{LOCAL_API_URL}}/projectFiscals", | ||
"host": [ | ||
"{{LOCAL_API_URL}}" | ||
], | ||
"path": [ | ||
"projectFiscals" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Delete Project Fiscal", | ||
"request": { | ||
"auth": { | ||
"type": "bearer", | ||
"bearer": [ | ||
{ | ||
"key": "token", | ||
"value": "{{accessToken}}", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "DELETE", | ||
"header": [], | ||
"url": { | ||
"raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", | ||
"host": [ | ||
"{{LOCAL_API_URL}}" | ||
], | ||
"path": [ | ||
"projectFiscals", | ||
"{{projectPlanFiscalGuid}}" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Delete Project", | ||
"request": { | ||
|