Skip to content
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

build: release 5.1.0 #1337

Merged
merged 70 commits into from Mar 10, 2021
Merged

build: release 5.1.0 #1337

merged 70 commits into from Mar 10, 2021

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Mar 10, 2021

New

  • feat: Add submission limits for submissions #1097
  • feat: Add submission limits for submissions #1268
  • feat: add timestamp to form submission end page #1110
  • feat: change logging of incorrect captcha response from error to warn #1258
  • feat: remove MyInfo error_description support #1323
  • feat: remove MyInfo support from SPCP endpoints #1314
  • feat: upgrade to beta version of myinfo-gov-client #1311

Improvements

  • chore: add newline in husky .gitignore #1272
  • chore: change copy & insert secretkeyloss golink #1293
  • refactor: convert frontend MyInfo services to TypeScript #1233
  • refactor: encapsulate parsed responses (part 1) #1140
  • refactor: migrate attachment validator to ts #1181
  • refactor: migrate checkbox validator to typescript #1225
  • refactor: remove try-catch from submissions pipeline #1315
  • refactor: stop replacing spaces in SAML artifact #1325
  • refactor/logic: Validate webpack upgrades are ready for React migration #1201
  • test: add tests for new MyInfo functionality #1313
  • feat(frontend): migrate file handler service to Typescript, update frontend test framework and lint #1243
  • feat(frontend): write FieldVerificationService in TypeScript #1259

Bug Fixes

  • fix: put back link for email reliability #1324
  • fix: remove form.msgSrvcName validation and add human error recovery message #1235

Dependency Updates

  • chore(deps-dev): bump @babel/core from 7.12.17 to 7.13.8 #1285
  • chore(deps-dev): bump @babel/plugin-transform-runtime #1263
  • chore(deps-dev): bump @babel/preset-env from 7.12.17 to 7.13.9 #1264
  • chore(deps-dev): bump @opengovsg/mockpass from 2.6.3 to 2.6.4 #1267
  • chore(deps-dev): bump @types/convict from 5.2.2 to 6.0.0 #1309
  • chore(deps-dev): bump @types/mongodb from 3.6.8 to 3.6.9 #1303
  • chore(deps-dev): bump @types/node from 14.14.31 to 14.14.32 #1300
  • chore(deps-dev): bump @types/node from 14.14.32 to 14.14.33 #1326
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #1253
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #1278
  • chore(deps-dev): bump @typescript-eslint/parser from 4.15.1 to 4.15.2 #1217
  • chore(deps-dev): bump @typescript-eslint/parser from 4.15.2 to 4.16.1 #1266
  • chore(deps-dev): bump @typescript-eslint/parser from 4.16.1 to 4.17.0 #1328
  • chore(deps-dev): bump core-js from 3.9.0 to 3.9.1 #1269
  • chore(deps-dev): bump eslint from 7.20.0 to 7.21.0 #1289
  • chore(deps-dev): bump eslint-config-prettier from 8.0.0 to 8.1.0 #1287
  • chore(deps-dev): bump eslint-plugin-jest from 24.1.5 to 24.1.7 #1304
  • chore(deps-dev): bump eslint-plugin-jest from 24.1.5 to 24.1.8 #1308
  • chore(deps-dev): bump eslint-plugin-jest from 24.1.8 to 24.1.9 #1319
  • chore(deps-dev): bump husky from 4.3.8 to 5.1.3 #1105
  • chore(deps-dev): bump mongodb-memory-server-core from 6.9.3 to 6.9.6 #1318
  • chore(deps-dev): bump stylelint from 13.11.0 to 13.12.0 #1307
  • chore(deps-dev): bump stylelint-config-standard from 20.0.0 to 21.0.0 #1321
  • chore(deps-dev): bump stylelint-prettier from 1.1.2 to 1.2.0 #1256
  • chore(deps-dev): bump testcafe from 1.11.0 to 1.12.0 #1294
  • chore(deps-dev): bump ts-jest from 26.5.1 to 26.5.2 #1261
  • chore(deps-dev): bump ts-jest from 26.5.2 to 26.5.3 #1295
  • chore(deps-dev): bump ts-node-dev from 1.1.1 to 1.1.6 #1281
  • fix(deps): bump @babel/runtime from 7.12.18 to 7.13.9 #1276
  • fix(deps): bump @babel/runtime from 7.13.9 to 7.13.10 #1327
  • fix(deps): bump @sentry/browser from 6.2.0 to 6.2.1 #1262
  • fix(deps): bump @sentry/integrations from 6.2.0 to 6.2.1 #1288
  • fix(deps): bump aws-info from 1.1.0 to 1.2.0 #1290
  • fix(deps): bump aws-sdk from 2.848.0 to 2.856.0 #1280
  • fix(deps): bump aws-sdk from 2.856.0 to 2.858.0 #1302
  • fix(deps): bump aws-sdk from 2.858.0 to 2.859.0 #1329
  • fix(deps): bump bcrypt from 5.0.0 to 5.0.1 #1274
  • fix(deps): bump connect-mongo from 3.2.0 to 4.2.0 #1240
  • fix(deps): bump connect-mongo from 4.2.0 to 4.2.2 #1286
  • fix(deps): bump has-ansi from 4.0.0 to 4.0.1 #1284
  • fix(deps): bump libphonenumber-js from 1.9.11 to 1.9.12 #1301
  • fix(deps): bump neverthrow from 4.1.0 to 4.1.1 #1255
  • fix(deps): bump nodemailer from 6.4.18 to 6.5.0 #1282
  • fix(deps): bump twilio from 3.56.0 to 3.57.0 #1275
  • fix(deps): bump whatwg-fetch from 3.6.1 to 3.6.2 #1271

liangyuanruo and others added 30 commits February 25, 2021 15:43
chore: merge Release v5.0.3 back to develop branch
chore: merge v5.0.4 into develop
* feat: Add submission limits for storage mode form submissions

* made changes to refactor out hasSubmissionLimit, and added support for email mode forms

* Fix types in form.service.ts

* change check order, and change logger.warn to logger.info

* use null instead of -1 as default value for submissionLimit

* remove 'submissionLimits' type

* Update src/app/modules/form/public-form/public-form.middlewares.ts

Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg>

* add check for public form before deactivating, and fix lint issues

* check not necessary

Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg>
* feat: add timestamp to form submission end page

* fix: adjust date formatting and CSS selection and styling for end-page
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.1 to 4.15.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.15.2/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <karrui.lau@gmail.com>
Bumps [neverthrow](https://github.com/supermacro/neverthrow) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/supermacro/neverthrow/releases)
- [Commits](supermacro/neverthrow@v4.1.0...v4.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [stylelint-prettier](https://github.com/prettier/stylelint-prettier) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/prettier/stylelint-prettier/releases)
- [Changelog](https://github.com/prettier/stylelint-prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/stylelint-prettier@v1.1.2...v1.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ontend test framework and lint (#1243)

* feat(FileHandlerSvc): add initial file

* ref(EditFieldsModal): use FileHandlerService instead of old client

* ref(EditStartPage): use FileHandlerService instead of old client

* ref(FieldAttachments): use shared utils instead of FileHandler

* feat: remove file-handler.client.service

* test: update frontend test runner to allow for typescript

* feat: allow cancellation when fetching presigned data

* feat: export uploadFile for testing

* chore: update eslint rules for testing

* chore: add jest-mock-axios package

* test(FileHandlerService): add unit tests

* chore: remove crypto-js package

* fix(FileHandlerSvc): update JSDoc

* test: manually instantiate mock axios instead of using a manual mock

* fix(FileHandlerSvc): base64 encode md5 before returning

also make the code more performant on larger files

* ref(FileHandlerSvc): mark uploadImage/Logo functions as async

* chore(eslint): fix projected path of tsconfig.json
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.1 to 26.5.2.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v26.5.1...v26.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.0...6.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.12.17 to 7.13.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.9/packages/babel-plugin-transform-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.17 to 7.13.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.9/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump husky from 4.3.8 to 5.0.9

Bumps [husky](https://github.com/typicode/husky) from 4.3.8 to 5.0.9.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v4.3.8...v5.0.9)

Signed-off-by: dependabot[bot] <support@github.com>

* feat: migrate to husky v5

* feat: upgrade to latest husky

* feat: change postinstall to prepare

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antariksh <antarikshmahajan@gmail.com>
Bumps [@opengovsg/mockpass](https://github.com/opengovsg/mockpass) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/opengovsg/mockpass/releases)
- [Commits](opengovsg/mockpass@v2.6.3...v2.6.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(deps): bump connect-mongo from 3.2.0 to 4.2.0

Bumps [connect-mongo](https://github.com/jdesboeufs/connect-mongo) from 3.2.0 to 4.2.0.
- [Release notes](https://github.com/jdesboeufs/connect-mongo/releases)
- [Changelog](https://github.com/jdesboeufs/connect-mongo/blob/master/CHANGELOG.md)
- [Commits](jdesboeufs/connect-mongo@v3.2.0...v4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

* fix: correctly instantiate connect-mongo store due to package upgrade

* fix(sessionLoader): use session memorystore if in test environment

* test: use test specific session memory store

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <karrui.lau@gmail.com>
Bumps [whatwg-fetch](https://github.com/github/fetch) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/github/fetch/releases)
- [Commits](JakeChampion/fetch@v3.6.1...v3.6.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.9.1/packages/core-js)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bcrypt](https://github.com/kelektiv/node.bcrypt.js) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/kelektiv/node.bcrypt.js/releases)
- [Changelog](https://github.com/kelektiv/node.bcrypt.js/blob/master/CHANGELOG.md)
- [Commits](kelektiv/node.bcrypt.js@v5.0.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [twilio](https://github.com/twilio/twilio-node) from 3.56.0 to 3.57.0.
- [Release notes](https://github.com/twilio/twilio-node/releases)
- [Changelog](https://github.com/twilio/twilio-node/blob/main/CHANGES.md)
- [Commits](twilio/twilio-node@3.56.0...3.57.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.12.18 to 7.13.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.9/packages/babel-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.848.0 to 2.856.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.848.0...v2.856.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ts-node-dev](https://github.com/whitecolor/ts-node-dev) from 1.1.1 to 1.1.6.
- [Release notes](https://github.com/whitecolor/ts-node-dev/releases)
- [Changelog](https://github.com/wclr/ts-node-dev/blob/master/CHANGELOG.md)
- [Commits](wclr/ts-node-dev@v1.1.1...v1.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tshuli and others added 19 commits March 8, 2021 13:39
* refactor: migrate checkboxValidator to ts

* refactor: update references

* chore: fix typos

* chore: add null as type for CheckboxValidationOptions customMax/customMin

* chore: add jest tests for checkbox validation

* refactor: split up nested ternary operator

* test: add test case for non-selected others checkbox

* test: add test case for multiple others, use helper to generate checkbox field and response

* fix: rework checkboxValidator to address edge case

* chore: add model validation to prevent duplicate checkbox fieldOptions

* chore: add validation message for checkbox field

* chore: rename answerValidatorFactory

* chore: fix indent for test

* refactor: use helper function directly in tests

* test: shift test category

* refactor: use helper function validateResponseWithValidator

* docs: checkboxValidator logic
* refactor: define EmailDataObj class

* refactor: use lodash compact

* docs: improve comments

* chore: shift business logic of returning masked autoreplydata to class

* chore: update tests

* chore: update types for response emails

* chore: rename jsonData to dataCollationData

* refactor: unnest compact

* refactor: convert maskField to generic maskStringHead function

* refactor: separate checks in tests

* chore: add defensive check that charsToReveal is nonnegative

* refactor: simplify use of state and run maskUidOnLastField only if necessary

Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg>

* style: lint

* refactor: use type instead of interface, constraint generic T on createFormattedDataForOneField

* refactor: avoid state

* build: resolve merge conflicts

* doc: remove comment

* docs: createFormattedDataForOneField

* chore: rename Submission Email Object, add unit tests

Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg>
* refactor: call new SubmissionEmailObj directly instead of createEmailData
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.1.8 to 24.1.9.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v24.1.8...v24.1.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1321)

Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 20.0.0 to 21.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/master/CHANGELOG.md)
- [Commits](stylelint/stylelint-config-standard@20.0.0...21.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yuanruo Liang <yuanruo@open.gov.sg>
* feat: upgrade to latest mockpass

* feat: remove error_description support
* ref: stop replacing spaces in SAML artifact

* ref: stop returning SAMLart from parse function
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.858.0 to 2.859.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.858.0...v2.859.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(FieldVfnSvc): rewrite frontend service in TypeScript

* feat: replace usage of Verification module in verifiable-field

with new FieldVerificationService

* feat: replace usage of Verification module in submit-form directive

* fix: make getErrorMessage backwards compatible

axios returns errors as AxiosErrors, will need to extract out the error response text to make it behave the same way as the previous implementation

* feat: remove verification.client.factory file

* ref: convert ITransaction from interface to type and extend empty obj

* feat(VfnCtl): return empty obj if no transaction needs to be created

* fix: frontend to check if transaction data is an empty obj or not

* test: add unit tests for FieldVerificationService

* feat: correct JSDoc for FetchNewTransactionResponse type

* test: fix vfn ctl tests for no transactions needed

* ref(verifiableField): import entire service instead of destructuring

* test: update test description for resetVerifiedField success case

Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com>

* feat: wrap promises with angularjs $q

* ref(FieldVfnSvc): add spacing between jest tests

Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.13.9 to 7.13.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-runtime)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.32 to 14.14.33.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

Tests

@tshuli

Submission Limits

  • Create a email mode form, and set the limit to zero. Note: Not possible to set limit to 0
  • Verify that the form is not visible.
    Screenshot 2021-03-10 at 1 02 19 PM
  • Set the limit to 1 and submit the form.
  • Verify that the submission goes through
  • Visit the form again and make sure that the form is not visible any more.
  • Set the limit to 2 and open two tabs.
  • Attempt to submit the form in both tabs. Only one should work.
  • Repeat the above using storage mode

Note:
Admin may be confused by the following UX:

  • If the admin tab is open while the submission limit is reached, the Settings tab will still show 'your form is ACTIVE' even after the form is deactivated. Navigating to other tabs does not refresh the state. Admin needs to manually refresh page or exit form admin view and reenter form admin view.
  • Similarly, Admin can increase the submission limit in the above situation under settings tab after the limit has been reached, and it would appear that the form is active AND submission limit has not been reached. Admin may be confused why the page is still not loading for public respondent.

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

Add timestamp to form submission end page
@tshuli

  • Submit a form. Check that timestamp appears in form submitted page.

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

Myinfo related

@tshuli

Remove MyInfo error_description support

  • Log in to a MyInfo form but click "Cancel" on the consent page. Ensure that you see the MyInfo error when redirected back to the form, and that there is matching message in the logs (message: 'MyInfo returned error from consent flow') which contains an errorDescription.

Remove MyInfo support from SPCP endpoints

  • Activate and submit a SingPass form
  • Activate and submit a CorpPass form

remove try-catch from submissions pipeline

  • Submit SingPass form in admin preview mode
  • Submit CorpPass form in admin preview mode
  • Submit MyInfo form in admin preview mode

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

@mantariksh
encapsulate parsed responses

  • Create a corppass form with email autoreply and pdf response. Submit form. Check that the autoreply email and pdf response both have a masked UID number with only the last 4 characters shown (e.g. *****123A)
  • Add a text field to the form with the title 'CorpPass Validated UID'. Check that the response on the text field is not masked in autoreply.
  • Check that the email response to the admin still has the full UID number.

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

@karrui
migrate attachment validator to ts

  • Create two required attachment fields with 1mb size limit each. Hide one of them behind logic. Check that normal submission using frontend succeeds for both visible and hidden field.
  • Check that following validation works when submitting programatically
  • Attachment size cannot be above the specified limit. Use the AngularJS inspector to modify field size limit to 2mb on frontend. Upload a file of >1mb. Check that submission is rejected "File size more than limit"
  • Attachment cannot be empty if required. First submit a form with the second attachment field hidden. Programatically resubmit with the second field unhidden but with no answer or attachment. Check that submission is rejected "Answer is empty string"
  • Now inject an answer into the response for the unhidden field but with no attachment content. Check that submission is rejected "No attachment content"

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

@karrui
migrate checkbox validator to typescript

  • Create two required checkbox fields. Hide one of them behind logic. Check that normal submission using frontend succeeds for both visible and hidden field.
  • Check that following validation works when submitting programatically
  • Answer array cannot be empty for required field
  • Answer array cannot have less than the specified minimum number of options
  • Answer array cannot have more than the specified maximum number of options
  • Answer array cannot have duplicate responses from fieldoption
  • Answer array cannot have answers which are not in the fieldoption
  • If 'others' is enabled, the others response cannot be empty (i.e. answer in answerArray cannot be 'Others: ')
  • Answer array can have two identical 'Others' responses as long as one of them is a valid fieldoption, apart from enabling others

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

@mantariksh
write FieldVerificationService in TypeScript

  • Create a form with no verified fields. The call to POST /transaction should return an empty object {}
  • Create a form with some verified fields. The call to POST /transaction should return an object with expiry and transaction id.
  • In a form with email verified fields, attempt to verify email. The OTP should be sent successfully to the email.
    • Provide an invalid OTP. Should show invalid OTP message below the OTP input field.
    • Correctly input OTP. Should successfully be verified.
  • In a form with mobile verified fields, attempt to verify mobile. The OTP should be sent successfully to the number.
    • Provide an invalid OTP. Should show invalid OTP message below the OTP input field.
    • Correctly input OTP. Should successfully be verified.
  • Should successfully submit form with verified fields as per normal

@tshuli
Copy link
Contributor Author

tshuli commented Mar 10, 2021

@karrui

IE11 intranet tests

general run-through

  • Create email mode form with all fields and custom start/end page. Activate and submit form. Check that you can receive responses in your intranet inbox.
  • Collaborators can be added in email mode.
  • Create storage mode form with all fields and custom start/end page. Activate and submit form.
  • Response CSV can be downloaded for storage mode.
  • Responses can be viewed in Data tab in storage mode.
  • Attachments for individual fields can be downloaded from Data tab in storage mode.
  • Attachment ZIP for submission can be downloaded from Data tab in storage mode.
  • Submission IDs can be filtered in storage mode.
  • Collaborators can be added and their collaborating rights edited in storage mode.

Unable to download both attachment and responses csv at the same time, seems like the double download is spazzing secure surfing

Submission Limits

  • Create a email mode form, and set the limit to zero.
  • Verify that the form is not visible.
  • Set the limit to 1 and submit the form.
  • Verify that the submission goes through
  • Visit the form again and make sure that the form is not visible any more.
  • Set the limit to 2 and open two tabs.
  • Attempt to submit the form in both tabs. Only one should work.
  • Repeat the above using storage mode

Storage mode shows submission error with no good recovery text unlike email mode.
Storage mode shows default "Please refresh the form and try again" whilst email mode shows form deactivated message

@tshuli tshuli merged commit ffa5606 into release Mar 10, 2021
@karrui karrui deleted the release-5.1.0 branch April 21, 2021 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants