-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(encrypt-submission): add missing ndi response fields #7425
fix(encrypt-submission): add missing ndi response fields #7425
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8ed3504
to
66d2d9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. How did we miss this 🙈
just a small thing to point out, it seems that if we add the ndi responses to the response object this causes
I was wondering if a better approach is to reduce the duplication of extracting the sgid from jwt token/OidcService & storage of nric field in the saved submission entry in the db I propose an alternative implementation:
Details: |
c4bf485
to
2b5ddcb
Compare
2b5ddcb
to
e1d4d71
Compare
src/app/modules/submission/encrypt-submission/encrypt-submission.controller.ts
Outdated
Show resolved
Hide resolved
hey @g-tejas, the code looks good! please let me know your thoughts on the PR comment |
b0ac37d
to
07ec710
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
884dc49
to
5cd89a5
Compare
…ng_for_email_notifications_on_encrypt-forms fix(tests): fix e2e testing for email notifications on encrypt-forms
5cd89a5
to
0b7b4bc
Compare
@@ -120,6 +123,7 @@ export const verifyEmailSubmission = async ({ | |||
getResponseTitle(field, { mode: FormResponseMode.Email }), | |||
...responseArray, | |||
]) | |||
if (!submission.attachments) continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we can change this to if ... { } instead of continue. justification: might be easier to understand for future modifications to not accidentally include test code that is not executed
@@ -193,6 +211,7 @@ export const verifyEncryptSubmission = async ( | |||
getResponseTitle(field, { mode: FormResponseMode.Email }), | |||
...responseArray, | |||
]) | |||
if (!submission.attachments) continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
src/app/modules/submission/email-submission/__tests__/email-submission.controller.spec.ts
Show resolved
Hide resolved
src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts
Outdated
Show resolved
Hide resolved
src/app/modules/submission/encrypt-submission/encrypt-submission.controller.ts
Show resolved
Hide resolved
* fix(encrypt-submission): add missing ndi response fields * fix(tests): fix e2e testing for email notifs on encrypt-form * fix: remove attachment tests temporarily * fix: fix comment for email test * test: add encrypt tests for nric masking in email notifs * test: enable jest tests * fix: fix comment for tests * test: fix verifyEncryptSubmission test
Problem
Previously for email notifications for storage mode forms, for MyInfo fields, only the [MyInfo] Name gets added, and not the "sgID Validate NRIC". This PR adds them.
Closes FRM-1752
Breaking Changes
Tests
Without NRIC Masking
With NRIC Masking