-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6710 from opengovsg/release_v6.77.0
build: release v6.77.0
- Loading branch information
Showing
18 changed files
with
162 additions
and
185 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 +1,7 @@ | ||
{ | ||
"name": "FormSG", | ||
"description": "Form Manager for Government", | ||
"version": "6.76.1", | ||
"version": "6.77.0", | ||
"homepage": "https://form.gov.sg", | ||
"authors": [ | ||
"FormSG <[email protected]>" | ||
|
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -74,7 +74,6 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
responses, | ||
'', | ||
false, | ||
) | ||
expect(initResult._unsafeUnwrap().responses).toEqual(responses) | ||
}) | ||
|
@@ -129,61 +128,11 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
responses, | ||
'', | ||
false, | ||
) | ||
const filteredResponses = [mobileResponse, emailResponse] | ||
expect(initResult._unsafeUnwrap().responses).toEqual(filteredResponses) | ||
}) | ||
|
||
it('should not filter responses when new encryption boundary flag is on', () => { | ||
mockCheckIsEncryptedEncoding.mockReturnValueOnce(ok(true)) | ||
const mobileField = generateDefaultField(BasicField.Mobile, { | ||
isVerifiable: true, | ||
}) | ||
const emailField = generateDefaultField(BasicField.Email, { | ||
isVerifiable: true, | ||
autoReplyOptions: { | ||
hasAutoReply: true, | ||
autoReplySubject: 'subject', | ||
autoReplySender: '[email protected]', | ||
autoReplyMessage: 'message', | ||
includeFormSummary: false, | ||
}, | ||
}) | ||
const yesNoField = generateDefaultField(BasicField.YesNo) | ||
const ratingField = generateDefaultField(BasicField.Rating) | ||
const basicFormFields = [mobileField, emailField, yesNoField, ratingField] | ||
const mobileResponse = generateSingleAnswerResponse( | ||
mobileField, | ||
'+6587654321', | ||
'signature', | ||
) | ||
const emailResponse = generateSingleAnswerResponse( | ||
emailField, | ||
'[email protected]', | ||
'signature', | ||
) | ||
const yesNoResponse = generateSingleAnswerResponse(yesNoField, 'Yes') | ||
const ratingResponse = generateSingleAnswerResponse(ratingField, '5') | ||
const responses = [ | ||
mobileResponse, | ||
emailResponse, | ||
yesNoResponse, | ||
ratingResponse, | ||
] | ||
const filteredResponses = responses | ||
const initResult = IncomingEncryptSubmission.init( | ||
{ | ||
responseMode: FormResponseMode.Encrypt, | ||
form_fields: basicFormFields, | ||
} as unknown as IPopulatedEncryptedForm, | ||
responses, | ||
'', | ||
true, | ||
) | ||
expect(initResult._unsafeUnwrap().responses).toEqual(filteredResponses) | ||
}) | ||
|
||
it('should fail when responses are missing', () => { | ||
mockCheckIsEncryptedEncoding.mockReturnValueOnce(ok(true)) | ||
const mobileField = generateDefaultField(BasicField.Mobile, { | ||
|
@@ -212,7 +161,6 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
responses, | ||
'', | ||
false, | ||
) | ||
expect(initResult._unsafeUnwrapErr()).toEqual( | ||
new ConflictError('Some form fields are missing'), | ||
|
@@ -260,7 +208,6 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
responses, | ||
'', | ||
false, | ||
) | ||
|
||
expect(result.isOk()).toEqual(true) | ||
|
@@ -283,7 +230,6 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
[mobileResponse], | ||
'', | ||
false, | ||
) | ||
|
||
expect(result.isErr()).toEqual(true) | ||
|
@@ -309,7 +255,6 @@ describe('IncomingEncryptSubmission', () => { | |
} as unknown as IPopulatedEncryptedForm, | ||
[], | ||
'', | ||
false, | ||
) | ||
|
||
expect(result.isErr()).toEqual(true) | ||
|
Oops, something went wrong.