Skip to content

Commit

Permalink
Merge branch 'main' into jl-mr-3405-reference-help-desk-email-in-syst…
Browse files Browse the repository at this point in the history
…em-notification-emails
  • Loading branch information
JasonLin0991 committed Aug 9, 2023
2 parents e25d28b + 050ffa0 commit c651014
Show file tree
Hide file tree
Showing 10 changed files with 1,218 additions and 613 deletions.
2 changes: 1 addition & 1 deletion services/app-api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'\\.graphql$': 'jest-raw-loader',
"\\.(gql|graphql)$": "@graphql-tools/jest-transform",
},
coverageReporters: [
[
Expand Down
8 changes: 4 additions & 4 deletions services/app-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@aws-sdk/client-ses": "^3.226.0",
"@aws-sdk/client-ssm": "^3.226.0",
"@aws-sdk/lib-storage": "^3.226.0",
"@launchdarkly/node-server-sdk": "8.1.0",
"@launchdarkly/node-server-sdk": "8.1.1",
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/core": "^1.9.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.35.1",
Expand Down Expand Up @@ -64,6 +64,7 @@
"zod": "^3.11.6"
},
"devDependencies": {
"@graphql-tools/jest-transform": "^2.0.0",
"@prisma/client": "^4.6",
"@types/archiver": "^5.1.1",
"@types/aws-lambda": "^8.10.83",
Expand All @@ -81,8 +82,7 @@
"eslint-plugin-jest": "^27.0.1",
"eslint-plugin-prettier": "^4.0.0",
"graphql-tag": "^2.12.5",
"jest": "^27.5.1",
"jest-raw-loader": "^1.0.1",
"jest": "^29.6.2",
"lint-staged": "^13.0.1",
"prettier": "^2.4.1",
"prisma": "^4.6",
Expand All @@ -96,7 +96,7 @@
"serverless-stack-termination-protection": "^2.0.2",
"serverless-webpack": "^5.11.0",
"slugify": "^1.6.5",
"ts-jest": "^27.1.4",
"ts-jest": "^29.1.1",
"ts-loader": "^9.2.8",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "4.9.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ exports[`renders overall email as expected 1`] = `
<br />
<b>Submission description</b>: A submitted submission<br />
<br />
<a href=\\"http://localhost/submissions/test-abc-125\\">View submission</a>
<a href="http://localhost/submissions/test-abc-125">View submission</a>
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`renders overall email for a new package with a rate amendment as expect
<br />
<b>Submission description</b>: A submitted submission<br />
<br />
<a href=\\"http://localhost/submissions/test-abc-125\\">View submission</a>
<a href="http://localhost/submissions/test-abc-125">View submission</a>
<br /><br />
If you need to make any changes, please contact CMS.
<br /><br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ exports[`renders overall email as expected 1`] = `
<b>Updated on:</b> 02/01/2022<br />
<b>Changes made:</b> Added more contract details.<br />
<b>Rate names</b>:
<ul style=\\"margin-top: 0px;\\">
<ul style="margin-top: 0px;">
<li>MCR-MN-0003-MSHO-RATE-20210101-20220101-CERTIFICATION-20210102</li>
<li>MCR-MN-0003-SNBC-RATE-20220201-20230201-CERTIFICATION-20220202</li>
</ul>
<br />
<a href=\\"http://localhost/submissions/test-abc-125\\">View the full submission</a>
<a href="http://localhost/submissions/test-abc-125">View the full submission</a>
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ exports[`renders overall email as expected 1`] = `
<b>Unlocked on:</b> 02/01/2022<br />
<b>Reason for unlock:</b> Adding rate certification.<br />
<b>Rate names</b>:
<ul style=\\"margin-top: 0px;\\">
<ul style="margin-top: 0px;">
<li>MCR-MN-0003-MSHO-RATE-20210101-20220101-CERTIFICATION-20210102</li>
<li>MCR-MN-0003-SNBC-RATE-20220201-20230201-CERTIFICATION-20220202</li>
</ul>
<br />
<b>You must revise the submission before CMS can continue reviewing it.<br />
<br />
<a href=\\"http://localhost/submissions/test-abc-125/edit/review-and-submit\\">Open the submission in MC-Review to make edits.</a>
<a href="http://localhost/submissions/test-abc-125/edit/review-and-submit">Open the submission in MC-Review to make edits.</a>
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,12 @@ describe('submitHealthPlanPackage', () => {
expect(submitResult.errors?.[0]).toEqual(
expect.objectContaining({
message: 'Email failed',
locations: [{ line: 2, column: 5 }],
path: ['submitHealthPlanPackage'],
extensions: {
code: 'INTERNAL_SERVER_ERROR',
cause: 'EMAIL_ERROR',
exception: {
message: 'Email failed',
path: undefined,
locations: undefined,
},
},
})
Expand Down
3 changes: 2 additions & 1 deletion services/app-web/src/s3/s3Amplify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT {
): Promise<string> => {
const result = await Storage.get(key, {
bucket: bucketConfig[bucket],
expires: 3600,
})
if (typeof result === 'string') {
return result
Expand Down Expand Up @@ -189,7 +190,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT {
return error
}

return await Storage.get(filename)
return await Storage.get(filename, { expires: 3600 })
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/uploads/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"serverless-s3-local": "^0.7.1",
"serverless-stack-termination-protection": "^2.0.2",
"serverless-webpack": "^5.11.0",
"ts-jest": "^27.1.4",
"ts-jest": "^29.1.1",
"ts-loader": "^9.2.8",
"tsconfig-paths-webpack-plugin": "^4.0.0"
}
Expand Down
Loading

0 comments on commit c651014

Please sign in to comment.