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 v5.8.0 #1737

Merged
merged 53 commits into from
Apr 28, 2021
Merged

build: release v5.8.0 #1737

merged 53 commits into from
Apr 28, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Apr 27, 2021

New

  • feat(spcp): raise sp cookie max age to 3 hrs #1727
  • feat: Add a limit for the number of MyInfo fields that can be added #1664
  • feat: prefill mainstream launch #1702

Fixes

  • fix: show correct error message for e-service ID validation #1722
  • fix: remove verified prefix on blank verified fields #1701

Improved

  • feat(client): log client form reCAPTCHA failure to GA #1684
  • feat(api): collapse spcp/myinfo redirect endpoint to new endpoint #1672
  • chore(admin-forms-routes): remove duplicate logic route endpoint #1703
  • feat(api-refactor): implement specific reorder field api #1726
  • chore(admin-forms-routes): remove duplicate logic route endpoint #1703
  • fix(mongoose): use official discriminator definitions #1704
  • fix: sync email field state between hasAllowedEmailDomains and allowedEmailDomains #1697
  • refactor(preview-api): duplicate adminform presign endpoints for /api/v3 #1644
  • feat(webhooks): streamline webhook response data #1696
  • refactor: Extract delete logic endpoint #1586
  • refactor(preview-api): duplicate adminform preview endpoints for /api/v3 #1643
  • feat(api-refactor): implement specific create field api #1671
  • feat(api-refactor): add specific API for updating of single form field #1640
  • refactor: shard public forms router #1669
  • feat(admin-forms): implement retrieval of form settings #1633
  • refactor: migrate submissions metadata #1651
  • fix: convert form field responses to field class #1739
  • refactor(test): integration and unit tests for redirect #1728
  • fix: update MyInfo field count correctly, show correct error #1738
  • refactor: use shared DateSelectedValidation enum instead of DATE_VALIDATION_OPTIONS object #1724
  • feat: update form guide links to go links #1750
  • chore(mergify): remove 0 check failure condition #1748
  • feat: show highlights only if prefill is provided in url #1742
  • fix: clone field to save before removing myinfo field info #1741

Dependency upgrades

  • chore(deps-dev): bump @types/jest from 26.0.22 to 26.0.23 #1735
  • chore(deps-dev): bump eslint-plugin-jest from 24.3.5 to 24.3.6 #1734
  • build(deps): bump mockpass and spcp-auth-client #1723
  • fix(deps): bump @sentry/browser from 6.3.0 to 6.3.1 #1719
  • chore(deps-dev): bump eslint-config-prettier from 8.2.0 to 8.3.0 #1716
  • chore(deps-dev): bump stylelint-config-standard from 21.0.0 to 22.0.0 #1720
  • fix(deps): bump @sentry/integrations from 6.3.0 to 6.3.1 #1718
  • chore(deps-dev): bump eslint from 7.24.0 to 7.25.0 #1717
  • chore(deps-dev): bump stylelint from 13.12.0 to 13.13.0 #1715
  • fix(deps): bump aws-sdk from 2.890.0 to 2.892.0 #1714
  • fix(deps): bump twilio from 3.60.0 to 3.61.0 #1711
  • fix(deps): bump aws-sdk from 2.889.0 to 2.890.0 #1710
  • chore(deps-dev): bump core-js from 3.10.2 to 3.11.0 #1709
  • fix(deps): bump @babel/runtime from 7.13.16 to 7.13.17 #1700
  • fix(deps): bump @sentry/integrations from 6.2.5 to 6.3.0 #1690
  • chore(deps-dev): bump @babel/core from 7.13.15 to 7.13.16 #1692
  • fix(deps): bump aws-sdk from 2.888.0 to 2.889.0 #1691
  • fix(deps): bump @babel/runtime from 7.13.10 to 7.13.16 #1689
  • fix(deps): bump validator from 13.5.2 to 13.6.0 #1688
  • fix(deps): bump @sentry/browser from 6.2.5 to 6.3.0 #1687
  • fix(deps): bump fp-ts from 2.10.3 to 2.10.4 #1686
  • fix(deps): bump aws-sdk from 2.892.0 to 2.893.0 #1745

mantariksh and others added 30 commits April 20, 2021 14:59
build: merge release 5.7.0 into develop
* refactor(encrypt-submission): changed handler to be an atomic export together wtih validator

* refactor(admin-form/submissions): add api endpoint for submissions/metadata and deprecate old endpt

* test(admin-forms/submission): fixes unit and integration tests for submissions/metadata

* refactor(submissions/client/factory): changed fe callsites to new be api

* refactor(encrypt-submission): inlined validator; reverted pageNum default value
* feat(admin-forms): implement retrieval of form settings

[form]
- augment `FormSchema.getFullFormById()`,
  which will partially populate an IPopulatedForm with specified keys,
  if given
- feed the `fields` argument supplied in the abovementioned fn as
  the projection arg of `Schema.findById()`
- implement `FormSchema.pick()`, allowing one to pick only the fields
  we want out of a given IFormSchema

[auth-service]
- implement `getFormFieldsAfterPermissionChecks()`, exploiting
  type-generic parameters to allow callers to specify the shape
  of the return value
- take care to only return fields specified by the caller

[admin-form]
- declare and implement `handleGetSettings()` in controller and route,
  taking inspiration from `handleUpdateSettings()`
  - import `FORM_SETTING_FIELDS` from form.server.model to specify the
    form setting fields we need

TODO: Unit-testing

* refactor(admin-form): separate auth and form retrieval concerns

- replace `getFormFieldsAfterPermissionChecks()` with the simpler
  `checkFormForPermissions()`, obliging callers to get their own
  form
- apply DRY and replace part of `getFormAfterPermissionChecks()`
  with a call to `checkFormForPermissions()`
- rework `handleGetSettings()` in `admin-form.controller` so that
  it handles form retrieval and returning a concise response
- avoid being clever; instead of specifying only the fields we need
  in the form and potentially saving I/O, just get the entire form
  and use the existing `getSettings()` to return to the caller.
  The resulting simplicity will probably outweigh any savings in
  mongodb I/O we get.
  - we may get a spike in I/O if calls for n parts of a given
    form ends up fetching the entire form n times from db to app.
    In that light...
- leave `FormService.retrieveFormFields()` where it is, in case
  we are proven wrong and we have to be conservative about I/O

TODO: Unit tests

* test: cover for handleGetSettings, retrieveFormFieldsById

Rename `retrieveFormFields()`  to `retrieveFormFieldsById()` to be
consistent with existing methods on FormService

* fix(get-settings): remove spurious typecast

* refactor(form): rename retrieveFormFieldsById to retrieveFormKeysById

* docs(auth): correct jsdoc for checkFormForPermissions

* refactor(form-settings): chain http verbs to route
* refactor(public-forms): moved subroutes out of main publicforms router

realised that public form is getting bloated adn we should not keep every route in the same file but
rather, shard by responsiblity. hence, this (mini) pr is for doign that before starting on auth
router to prevent excess bloat from accumulating

* refactor(public-form/tests): shards tests out also

* style(api): changed folder name to forms instead of public
Bumps [fp-ts](https://github.com/gcanti/fp-ts) from 2.10.3 to 2.10.4.
- [Release notes](https://github.com/gcanti/fp-ts/releases)
- [Changelog](https://github.com/gcanti/fp-ts/blob/master/CHANGELOG.md)
- [Commits](gcanti/fp-ts@2.10.3...2.10.4)

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.5 to 6.3.0.
- [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.5...6.3.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [validator](https://github.com/validatorjs/validator.js) from 13.5.2 to 13.6.0.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/13.6.0/CHANGELOG.md)
- [Commits](validatorjs/validator.js@13.5.2...13.6.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.13.10 to 7.13.16.
- [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.16/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.888.0 to 2.889.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.888.0...v2.889.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16.
- [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.16/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.2.5 to 6.3.0.
- [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.5...6.3.0)

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

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

* feat: add FormField type that is a union for every possible field

* feat: return http 422 status code on EditFieldError instead of 400

* feat(AdminFormService): add updateFormField to update single field

* feat(AdminFormCtl): add handleUpdateFormField fn

* feat(AdminFormRoutes): add PUT endpoint for updating single form field

* feat(AdminFormClientCtl): add specific update field handling in update

* feat: update types of mongo subdocs to allow for DocumentArray

allows for special array methods such as `id()`, `pull()`, etc

* test(AdminForm): update test for invalid field update to return 422

* feat(formUtils): add getFormFieldById helper method

uses DocumentArray#id method if available, else uses Array#find

* test(formUtils): add unit tests for getFormFieldById

* ref: rename admin-forms.build.routes to admin-forms.form.routes

for consistency with #1635

* feat: add Form instance method updateFormFieldById

seems like a better place to for the manipulation of the form instead of in the service directly

* ref(AdminFormSvc): use Form model method in update field service fn

* feat(AdminFormRoutes): strengthen Joi validation for update field

ensures body._id given is the same as the params.fieldId so ids of fields cannot be changed so easily

* feat: add FormFieldDto type for use in update form field handler

* fix(formUtils): fix evaluation of whether array is mongoose doc array

* test(FormModel): add unit tests for updateFormFieldById instance fn

* test(AdminFormSvc): add unit tests for updateFormField fn

* test(AdminFormCtl): add unit tests for handleUpdateFormField

* ref: group joi validation middleware with controller fn in export

* feat: only merge updated field if index of updated field exists

* feat(client): call update field endpoint on updating myinfo fields too

* test(AdminFormCtl): correct name of _handleUpdateFormField in desc

* ref(mongooseUtils): move isMongooseDocumentArray to own util file

* ref(formUtils): remove profane usage of else after return

* ref: convert constants/update-form-types.js to TypeScript

* feat: show error Toast when returned field don't map to current fields
* feat(AdminFormSvc): add dummy createFormField function

* feat(AdminFormCtl): add handleCreateFormField controller and router fn

* feat(FormModel): add insertFormField model instance method

* feat(AdminFormSvc): add and use createFormField service fn

* feat(AdminFormCtl): Joi prevent globalId from being provided

* feat(client): impl createSingleFormField service fn for field creation

* feat(AdminFormCtl): loosen Joi validation required keys

most of the loosened keys have sane defaults already

* fix(AdminFormCtl): remove incorrect fieldId type declaration

* test(AdminFormCtl): add unit tests for _handleCreateFormField fn

* test(AdminFormSvc): add unit tests for createFormField fn

* test(FormModel): add unit tests for insertFormField instance method
…/v3 (#1643)

* refactor(admin-form-api): duplicate adminform form endpoints for /api/v3i

- duplicate and update adminform form related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* refactor(admin-form-api): remove unneeded joi-date extension

* refactor(preview-api): duplicate adminform preview endpoints for /api/v3

- duplicate and update adminform preview related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* ref(preview-api): remove duplicate user auth middleware from routes

* ref(preview-api): consolidate middleware into controller

- shift validators into admin-form controller
- update handler methods to include middleware as request handler array
- update controller integration tests
- update old routes to use new handler
- update new routes to use new handler
* refactor: v3 delete logic api

* test: integration tests

* chore: use general form model

* refactor: use mongoose $pull operator instead of manual filtering

* chore: return transformMongoError

* refactor: use ObjectId()

* chore: add unit tests

* refactor: default message for LogicNotFoundError

* refactor: shift logic to separate router

* chore: add test case for logicId cannot be found

* chore: reset mock forms in beforeEach

* refactor: FormModel

* refactor: shift tests to admin-forms.logic.routes.spec

* refactor: simplify return of deleteFormLogic

* chore: frontend changes for delete logic api

* chore: simplify

* refactor: use model static method

* chore: use $q to splice only upon success

* refactor: pass in formId string instead of form object

* test: add unit tests for static method

* chore: return form instead of true

* nit: typo

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

* chore: add details to error msg

* chore: add test for multiple logic case

* build: merge conflict

* chore: not send message on logic delete

* chore: add return true for axios

* chore: splice upon promise success

* chore: cast form._id to string

* chore: update 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.16 to 7.13.17.
- [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.17/packages/babel-runtime)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: remove useless fields and make others required

* feat: remove logic to store useless fields

* feat: allow data and headers to be empty strings

* test: update tests
* fix(email): remove verified tag for blank fields

* docs: verified prefix should not be added if field is blank
…/v3 (#1644)

* refactor(admin-form-api): duplicate adminform form endpoints for /api/v3i

- duplicate and update adminform form related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* refactor(admin-form-api): remove unneeded joi-date extension

* refactor(preview-api): duplicate adminform preview endpoints for /api/v3

- duplicate and update adminform preview related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* refactor(preview-api): duplicate adminform presign endpoints for /api/v3

- duplicate and update adminform presigned image/logo endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* ref(presign-api): remove duplicate user auth middleware from route

* ref(presign-api): consolidate validators into controller

- shift validators into admin-form controller
- update handler methods to include validators as request handler array
- update controller integration tests
- update old routes to use new handler
- update new routes to use new handleri
…dEmailDomains (#1697)

* fix: sync client hasAllowedEmailDomains and allowedEmailDomains states

* fix: watch field.isVerifiable to show relevant tooltip

* feat: add logger to track deprecated updateForm endpoint calls

* fix: sync inconsistent email field states in the backend

* fix: sync email field states in getUpdatedFormFields fn instead

states may desync in the create or update actions

* test(adminFormUtils): add extra tests for syncing of email fields
Now that mongoose properly defines discriminator(), drop our
custom definition of DocumentArray in favour of the official one

- pick up the latest version of mongoose
- go back to casting the return value of `FormSchema.path()` as a
  DocumentArray, as opposed to our custom definition of it
- remove custom definitions of mongoose types, no longer used
chore: merge v5.7.1 into develop
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.10.2 to 3.11.0.
- [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.11.0/packages/core-js)

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.889.0 to 2.890.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.889.0...v2.890.0)

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.60.0 to 3.61.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.60.0...3.61.0)

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.890.0 to 2.892.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.890.0...v2.892.0)

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

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 7.24.0 to 7.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.24.0...v7.25.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.3.0 to 6.3.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.3.0...6.3.1)

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

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

mantariksh commented Apr 27, 2021

@tshuli

Tests

Streamline webhook response data

  • Set up a server to receive webhooks which only returns 4xx. Submit a webhooked form and check that the response status code, data, headers, webhook URL and signature are reflected in the submission document.
  • Repeat with a server which returns 2xx.

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@seaerchin

Tests

Logic API refactor

  • Create a form with single logic.
    • Check that delete logic works on admin view Logic Tab. The network call should return 200.
    • Repeat the above with multiple logic. Check that only one logic is deleted.
  • Test using manual API calls
    • Check that new delete endpoint DELETE /forms/:formId/logic/:logicId returns 200 when formId and logicId are correct and that the specific logicId is deleted from db
    • Check that endpoint returns 404 when formId or logicId are incorrect

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@seaerchin

Tests

Preview endpoint API refactor

  • Check that forms can be previewed as admin (GET /api/v3/admin/forms/:formId/preview)
  • Check that previewed forms in email mode can be submitted and an email response is received (POST /api/v3/admin/forms/:formId/preview/submissions/email)
  • Check that previewed forms in encrypt mode can be submitted (POST /api/v3/admin/forms/:formId/preview/submissions/encrypt)

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@seaerchin

Tests

Create field API refactor

  • Create a new field. Should be created successfully. Network tab should show a call to the new endpoint.
  • Create a new MyInfo field. Should be created successfully. Network tab should show a call to the new endpoint.

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@seaerchin

Tests

Update field API refactor

  • Create a new field and then edit and save it. The field should successfully be updated (go into the field and check again)
    • Update image fields (change image). Should update correctly.
    • Update attachment fields (size, description, etc). Should update correctly.
    • Try a sample various variants of other fields. All should be successfully saved.
      fields tested:
      1. short/long text
      2. dropdown
      3. date
      4. yes/no
      5. email
      6. rating
      7. yes/no
  • Create a new myinfo field and then edit and save it. The field should be "updated" without changes

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@mantariksh

Tests

Submissions metadata API refactor

  • Create a storage mode form and activate it. Submit >10 responses to the form. Go to the admin panel and click on data
    • Verify that clicking on any page returns a list of responses
    • Verify that searching on any single response id returns exactly that response
    • Verify that searching on any substring of a response id returns nothing

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@mantariksh

Tests

Intranet IE11 runthrough

  • 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.

yong-jie and others added 2 commits April 27, 2021 10:27
* fix: show correct error message

Error messages were showing up incorrectly due to incorrect accessing
of keys in the error object. The fix was to access the correct keys.

* fix: change push to assignment

This triggers the AngularJS digest cycle correctly, which updates the
count of MyInfo fields correctly.
tshuli and others added 3 commits April 27, 2021 11:26
* feat: add prefill toggle to short text field

* feat: display fieldID on edit field modal

* feat: field id copy functionality

* feat: show Field ID only when prefill enabled

* feat: prefill warning banner on submit form page

* feat: msg to inform user that field id is generated after field saved

* style: define prefill highlight in css and use ng-class

* feat: show prefill warning only if field isVisible and monitor using scope.$watch

* chore: use data-clipboard-target instead of text

* style: add cursor for prefill icon

* style: field id input

* style: cursor for pull-right
* test(auth/controller): adds unit tests for getRedirectLink

* test(public-forms/auth): adds integration tests

* test(auth/controller): fixed type errors

* test(authservice/test): adds auth service test

* refactor(tests): fixed renaming of files and ported over redirect tests to public form controller

* test(public-form/controller/tests): added additional tests for /redirect endpoint, shifted const out

* docs(publicformauthservice/test): adds arrange act assert blcoks

* chore(auth/controller/spec): removed outdated forms from shifting redirect to publci-forms

* test(public-form): updated tests

* chore(public-form/controller/test): updated types in tests

* chore(public-form/controller/tests): updated typings

* test(public-forms/auth/routes): added stronger validation to integration test for external libraries

* docs(public-forms/auth/routes/spec): fixed test description having wrong http method

* style(public-forms/auth/routes): merged assertions into single block
* fix: convert form field responses into class counterparts

this fixes a bug where the Field class methods were being invoked on some fields and failing due to the field being a pure object without injected class methods

* fix: remove myinfo field info before saving myinfo field

* fix: inject myinfo field info in case retrieved field is myinfo field
@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@mantariksh

Tests

Prefill feature

  • Create two short text fields and set prefill toggle to true. Open form in public view. Check that the fields are prefillable by adding the query params to URL
  • Check that prefill fields are highlighted in yellow
  • Check that warning label appears if there are prefillable fields on form, and does not appear if there are no prefillable fields on form
  • Hide prefill field with logic. Check that warning label only appears when field is visible.

@mantariksh
Copy link
Contributor Author

mantariksh commented Apr 27, 2021

@tshuli

Tests

Form/field interceptor migration

  • Create a table field and save it. Without refreshing, edit the table field again. The table should be rendered properly and changes should be saved successfully.
  • Create a Race MyInfo field. When saving it, check the network request. The body should contain the following empty key-values:
fieldName: ""
fieldOptions: []
fieldType: "dropdown"
fieldValue: ""
  • Update the same MyInfo field. The network request body should look the same.

dependabot bot and others added 2 commits April 28, 2021 02:15
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.892.0 to 2.893.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.892.0...v2.893.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
karrui
karrui previously approved these changes Apr 28, 2021
@mantariksh mantariksh merged commit 158be1c into release Apr 28, 2021
@mantariksh mantariksh deleted the release-v5.8.0 branch June 17, 2021 08:05
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.

9 participants