-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prod Release 2023-10-03 - Take 1 (#2008)
- Loading branch information
Showing
23 changed files
with
294 additions
and
115 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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
const chai = require('chai'); | ||
const chaiAsPromised = require('chai-as-promised'); | ||
|
||
chai.use(chaiAsPromised); | ||
|
||
const { expect } = require('chai'); | ||
const sinon = require('sinon'); | ||
const email = require('../../../../src/lib/email'); | ||
|
@@ -90,7 +95,10 @@ describe('audit report generation', () => { | |
sandbox.replace(aws, 'getS3Client', s3Fake); | ||
|
||
const tenantId = 0; | ||
await withTenantId(tenantId, () => audit_report.generateAndSendEmail('usdigitalresponse.org', '[email protected]')); | ||
await expect(withTenantId( | ||
tenantId, | ||
() => audit_report.generateAndSendEmail('usdigitalresponse.org', '[email protected]'), | ||
)).to.be.rejected; | ||
|
||
console.log('Asserting generate function'); | ||
expect(generateFake.calledOnce).to.equal(true); | ||
|
@@ -110,4 +118,59 @@ describe('audit report generation', () => { | |
console.log('Asserting presigned and email function'); | ||
expect(sendEmailFake.notCalled).to.equal(true); | ||
}); | ||
|
||
it('headers should be in the proper order', () => { | ||
const projects = [{ | ||
'09-30-2021 Total Aggregate Expenditures': 150000, | ||
'09-30-2022 Total Aggregate Obligations': 300000, | ||
'09-30-2022 Total Expenditures for Awards Greater or Equal to $50k': 0, | ||
'09-30-2022 Total Obligations for Awards Greater or Equal to $50k': 0, | ||
'Capital Expenditure Amount': 0, | ||
'Project Description': 'Sample description', | ||
'Project Expenditure Category': '2.32-Business Incubators and Start-Up or Expansion Assistance', | ||
'Project Expenditure Category Group': '2-Negative Economic Impacts', | ||
'Project ID': '4', | ||
}, { | ||
'12-31-2022 Total Aggregate Expenditures': 150000, | ||
'12-31-2022 Total Aggregate Obligations': 300000, | ||
'12-31-2022 Total Expenditures for Awards Greater or Equal to $50k': 0, | ||
'12-31-2022 Total Obligations for Awards Greater or Equal to $50k': 0, | ||
'Capital Expenditure Amount': 0, | ||
'Project Description': 'Sample description', | ||
'Project Expenditure Category': '2.32-Business Incubators and Start-Up or Expansion Assistance', | ||
'Project Expenditure Category Group': '2-Negative Economic Impacts', | ||
'Project ID': '4', | ||
}, { | ||
'03-30-2023 Total Aggregate Expenditures': 150000, | ||
'03-30-2023 Total Aggregate Obligations': 300000, | ||
'03-30-2023 Total Expenditures for Awards Greater or Equal to $50k': 0, | ||
'03-30-2023 Total Obligations for Awards Greater or Equal to $50k': 0, | ||
'Capital Expenditure Amount': 0, | ||
'Project Description': 'Sample description', | ||
'Project Expenditure Category': '2.32-Business Incubators and Start-Up or Expansion Assistance', | ||
'Project Expenditure Category Group': '2-Negative Economic Impacts', | ||
'Project ID': '4', | ||
}]; | ||
const headers = audit_report.createHeadersProjectSummariesV2(projects); | ||
const headersExpected = [ | ||
'Project ID', | ||
'Project Description', | ||
'Project Expenditure Category Group', | ||
'Project Expenditure Category', | ||
'Capital Expenditure Amount', | ||
'09-30-2021 Total Aggregate Obligations', | ||
'12-31-2022 Total Aggregate Obligations', | ||
'03-30-2023 Total Aggregate Obligations', | ||
'09-30-2022 Total Aggregate Expenditures', | ||
'12-31-2022 Total Aggregate Expenditures', | ||
'03-30-2023 Total Aggregate Expenditures', | ||
'09-30-2022 Total Obligations for Awards Greater or Equal to $50k', | ||
'12-31-2022 Total Obligations for Awards Greater or Equal to $50k', | ||
'03-30-2023 Total Obligations for Awards Greater or Equal to $50k', | ||
'09-30-2022 Total Expenditures for Awards Greater or Equal to $50k', | ||
'12-31-2022 Total Expenditures for Awards Greater or Equal to $50k', | ||
'03-30-2023 Total Expenditures for Awards Greater or Equal to $50k', | ||
]; | ||
expect(headers[1]).to.equal(headersExpected[1]); | ||
}); | ||
}); |
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
Binary file modified
BIN
-14 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project111210BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+3 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project18_229233BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-21 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project19_234BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+9 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project211214BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project2128BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-17 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project215218BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+13 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project224227BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-18 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project236BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project31BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+23 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project32BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-27 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project4142BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-26 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project51518BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
-40 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/project519521BulkUpload.xlsx
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
packages/server/src/arpa_reporter/data/treasury/projectBaselineBulkUploadTemplate.xlsx
Binary file not shown.
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
Oops, something went wrong.