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.10.0 #1856

Merged
merged 40 commits into from
May 11, 2021
Merged

build: Release v5.10.0 #1856

merged 40 commits into from
May 11, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented May 11, 2021

Release v5.10.0

Features

  • feat: add <sg-govt-banner-component> to top of public forms #1439
  • feat: move server.ts into src/app #1785
  • feat(admin-form): individual form field api  #1799
  • feat(api-refactor): add specific update end page endpoint in server #1760
  • feat(email-submission): separate error logging for db and state checks #1813
  • feat: extract update logic endpoint #1695
  • feat(adminform): update form collab endpoint #1744

Fixes

  • fix: align joi validation types to schema #1800
  • fix: remove Learn More link for MyInfo field limit #1802
  • fix: speed up precommit hooks #1820

Misc

  • chore: gitignore intellij files #1798

Dependencies updates

  • fix(deps): bump @sentry/browser from 6.3.5 to 6.3.6 #1851
  • fix(deps): bump abortcontroller-polyfill from 1.7.1 to 1.7.3 #1823
  • fix(deps): bump aws-sdk from 2.897.0 to 2.899.0 #1793
  • fix(deps): bump aws-sdk from 2.899.0 to 2.900.0 #1809
  • fix(deps): bump aws-sdk from 2.900.0 to 2.901.0 #1816
  • fix(deps): bump aws-sdk from 2.901.0 to 2.903.0 #1826
  • fix(deps): bump convict from 6.0.1 to 6.1.0 #1792
  • fix(deps): bump libphonenumber-js from 1.9.16 to 1.9.17 #1791
  • fix(deps): bump twilio from 3.61.0 to 3.62.0 #1818

Devdeps

  • chore(deps-dev): bump @babel/preset-env from 7.14.0 to 7.14.1 #1795
  • chore(deps-dev): bump @types/bcrypt from 3.0.1 to 5.0.0 #1830
  • chore(deps-dev): bump @types/bluebird from 3.5.33 to 3.5.34 #1807
  • chore(deps-dev): bump @types/node from 14.14.43 to 14.14.44 #1805
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #1790
  • chore(deps-dev): bump @typescript-eslint/parser from 4.22.0 to 4.22.1 #1794
  • chore(deps-dev): bump @typescript-eslint/parser from 4.22.1 to 4.23.0 #1852
  • chore(deps-dev): bump concurrently from 6.0.2 to 6.1.0 #1832
  • chore(deps-dev): bump core-js from 3.11.2 to 3.11.3 #1808
  • chore(deps-dev): bump core-js from 3.11.3 to 3.12.0 #1817
  • chore(deps-dev): bump core-js from 3.12.0 to 3.12.1 #1829
  • chore(deps-dev): bump date-fns from 2.21.1 to 2.21.2 #1806
  • chore(deps-dev): bump date-fns from 2.21.2 to 2.21.3 #1824
  • chore(deps-dev): bump eslint from 7.25.0 to 7.26.0 #1828
  • chore(deps-dev): bump lint-staged from 10.5.4 to 11.0.0 #1827
  • chore(deps-dev): bump ts-jest from 26.5.5 to 26.5.6 #1804

karrui and others added 30 commits May 4, 2021 18:44
make it more obvious that it is a backend file
…1760)

* feat(FormModel): add updateEndPageById form static method

* feat(AdminFormSvc): add updateEndPage fn

* feat(AdminFormCtl): add handler for updating form end page

* test(FormModel): add unit tests for static method updateEndPageById

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

* test(AdminFormCtl): add unit tests for _handleUpdateEndPage

* feat: remove required end page title from Joi validation

* test(FormModel): test insertion of defaults when updating end page

* feat(client): use update endpage api in client, add button link url validation (#1761)

* feat(client/edit-end-page-modal): remove unused functions

Seems to be left behind when endpage.buttons was removed

* feat(client): add updateFormEndPage to call API

* feat(client): add scoped function to call update end-page API

* feat(client/validate-url): add non-https mode validation

* feat(client): add url validation to end page button link

* feat: add todo to track redundant type assertions
Bumps [convict](https://github.com/mozilla/node-convict) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/mozilla/node-convict/releases)
- [Changelog](https://github.com/mozilla/node-convict/blob/master/CHANGELOG.md)
- [Commits](mozilla/node-convict@v6.0.1...v6.1.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.897.0 to 2.899.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.897.0...v2.899.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add <sg-govt-banner-component> to forms header view

* feat: remove awkward govt banner indent from forms

* fix: move govt banner to above site banner
* feat: add model static method for update logic

* feat: add update logic to controller

* feat: add update logic to routes

* feat: frontend for update logic

* chore: cast to string

* refactor: pass in formId string to findByIdAndUpdate

* refactor: shift $uibModalInstance.close() to updateExistingLogic()

* chore: update global myform logic

* refactor: use ILogicWithId type

* chore: replace ParamsDictionary with specific type

* chore: add joi validation, return form

* chore: update frontend using form logic object returned from database

* chore: update tests

* chore: clean up types for handleUpdateLogic, return updated logic object

* chore: update frontend

* chore: tighten joi validation

* chore: standardise to using _id, update tests

* chore: add test case for logicId not existing in DB

* chore: implement getLogicById

* refactor: pass updatedLogic directly in req.body

* refactor: trigger digest cycle by updating vm.formLogic

* chore: update joi validation

* refactor: use toHexString

* refactor: remove spread operator

* refactor: remove spread operator

* refactor: simplify test to mock return value of updateFormLogic

* chore: add type for test

* chore: update test for controller

* chore: add missing typings

* build: fix merge conflicts
chore: merge v5.9.0 into develop
IntelliJ IDEs generate a .idea directory for metadata.
* feat(form/server/model): adds method to updateFormCollaborators

* feat(form/types; admin-form/service): adds service method for updating collaborators; adds typings

* feat(admin-forms/settings/routes): adds controller and handler for updating collaborators of a form

* feat(public/service): adds method on AdminFormService to update collaborators

* refactor(collaborator-modal.client.controller): replaces old call with new AdminFormService call

* docs(admin-forms): fixed typos in handleUpdateCollaborators

* test(tests): adds unit tests for form model, admin form service and admin form controller

* refactor(admin-form/controller): changed unknown on joi vaildator to optional

* refactor(types): adds _id to the type of Permission

* refactor(admin-form/collaborators): updated dto to be just an array; error message extraction fixed

* fix(collaborator-modal/client/controller): fixed fe callsites showing celebrate errors

* fix(collaborator-modal/client/controller): fixed error caused by accidental auto import

* refactor(admin-form/controller): changed to use .json and formCollaborators is properly selected

* test(form/server/model/spec): changed test to use .rejects()

* style(collaborator-modal/client/controller): updated error message

* test(admin-forms): integration tests for updating of collaborators (#1753)

* test(admin-forms/settings): integration tests for updating of collaborators

* docs(admin-forms/settings/test): updated comment for test

* test(admin-form/settings/routes/spec): updated tests for new shape

* docs(admin-form/settings/routse/spec): updated http verb to PUT

* refactor(adminform): extract get collaborators (#1762)

* feat(admin-form/controller): added new route and controller for GET admin-form/collaborators

* feat(admin-form/controller): adds new GET admin/form/collaborators endpoint

* test(admin-form/controller): adds unit tests for new endpoint

* test(admin-form/controller): fixed email domain in tests being from gov

* chore(admin-form/collaborators): updated docs and changed from res.send to res.json

* test(admin-forms/settings/routes): added integration tests for GET /collaborators (#1777)

* chore(admin-forms/settings/routes/spec): removed double import
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.5 to 26.5.6.
- [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.5...v26.5.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.21.1 to 2.21.2.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.21.1...v2.21.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.899.0 to 2.900.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.899.0...v2.900.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* style(form/errors): fixed typo

* feat(admin-form/service): adds new method to retrieve formfield

* feat(admin-form/controller): added new handler for GET /field/:fieldId

* feat(admin-forms/form/routes): added new route for GET /field/:fieldId

* feat(adminformservice): added new methoid to get single form field

* docs(admin-form): updated docs for get /fields/:fieldId

* refactor(generate-form-data): added extra case statement for generation of Rating field

* test(admin-form): added unit and integration tests for GET /fields/:fieldId
#1813)

Currently, the first two stages of the submission pipeline have their errors logged jointly. This could be confusing if we have to debug error messages. This is also inconsistent from the rest of the pipeline.
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.900.0 to 2.901.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.900.0...v2.901.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [twilio](https://github.com/twilio/twilio-node) from 3.61.0 to 3.62.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.61.0...3.62.0)

Signed-off-by: dependabot[bot] <[email protected]>

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

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.901.0 to 2.903.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.901.0...v2.903.0)

Signed-off-by: dependabot[bot] <[email protected]>

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

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 7 commits May 10, 2021 10:24
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.4 to 11.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v10.5.4...v11.0.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @types/bcrypt from 3.0.1 to 5.0.0

Bumps [@types/bcrypt](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bcrypt) from 3.0.1 to 5.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/bcrypt)

Signed-off-by: dependabot[bot] <[email protected]>

* fix: update types for bcrypt wrappers

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antariksh <[email protected]>
Bumps [concurrently](https://github.com/kimmobrunfeldt/concurrently) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/kimmobrunfeldt/concurrently/releases)
- [Commits](kimmobrunfeldt/concurrently@v6.0.2...v6.1.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: align joi validation types to schema

* chore: adjust joi validation types

* fix: typing for LogicDto

* chore: refine types
Bumps [abortcontroller-polyfill](https://github.com/mo/abortcontroller-polyfill) from 1.7.1 to 1.7.3.
- [Release notes](https://github.com/mo/abortcontroller-polyfill/releases)
- [Commits](https://github.com/mo/abortcontroller-polyfill/commits)

Signed-off-by: dependabot[bot] <[email protected]>

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

Signed-off-by: dependabot[bot] <[email protected]>

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

karrui commented May 11, 2021

@seaerchin

Tests

add to top of public forms

  • Go to public forms, the SG Govt masthead should appear above the banner message
  • Scrolling should work as per normal, with only the banner message remaining sticky

@karrui
Copy link
Contributor Author

karrui commented May 11, 2021

@yong-jie

Tests

Update end page API

  • Create a new form. Go into the admin panel and click the start page. Add a random button link without http:// prefix. Save end page and reopen end page. The URL should have been prefixed with http://.
  • Edit the end page button link to a URL with https://. Also edit the button text. Should save successfully.
  • Go to the form and submit the form. The button text should be the custom button text, and clicking the button should redirect you to the button link you used when editing end page.

@karrui
Copy link
Contributor Author

karrui commented May 11, 2021

@karrui

Tests

Update logic specific endpoint

  • Create field with one logic field. Edit logic - both from show field to prevent submit and vice versa. Check that logic is successfully edited.
  • Check that build tab is updated correctly (hidden fields should be greyed out based on logic)
  • Repeat the above with more than one logic field.

Test using manual API calls

  • Check that endpoint returns 404 when formId or logicId are incorrect

@karrui
Copy link
Contributor Author

karrui commented May 11, 2021

@tshuli

Tests

Edit form collaborators specific API

  • Add a collaborator with a valid .gov.sg email as editor to the form. After doing so, attempt to change their role to read-only. Thereafter, delete the collaborator. This should all succeed.
  • UI bug where spinner doesn't stop after successful add collaborator
  • Add a collaborator with a valid .gov.sg email as read-only to the form. After doing so, attempt to change their role to editor. Thereafter, delete the collaborator. This should all succeed.
  • Attempt to add a collaborator with an invalid email to the form. This should fail with an error message.
    • try using .gov.sga
    • try using invalid email domains @imamonster.com
    • try using personal emails
    • please feel free to add more

@karrui
Copy link
Contributor Author

karrui commented May 11, 2021

@mantariksh

Tests

GSIB IE11 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. [waiting until collaborator modal button is fixed]
  • 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. [waiting until collaborator modal button is fixed]

New features/fixes

  • Editing form collaborators should work properly
  • Updating logic should work properly
  • Updating form's end page should work properly
  • SG Govt masthead should show up properly

dependabot bot and others added 3 commits May 11, 2021 05:28
Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.6 to 1.4.7.
- [Release notes](https://github.com/opengovsg/spcp-auth-client/releases)
- [Commits](opengovsg/spcp-auth-client@v1.4.6...v1.4.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(collaborator-modal/client/controller): bugfix for spinner ui

* fix(collaborator-modal/client/controller): changes into then/catch blocks

* chore(collaborator-modal/client/controller): removes console log

* style(collaborator-modal/client/controller): removed unneeded lines and cleaned up code
@karrui karrui force-pushed the release-v5.10.0 branch 2 times, most recently from c5d7176 to 0615ce5 Compare May 11, 2021 06:17
@karrui karrui merged commit 8d3fc95 into release May 11, 2021
@karrui karrui deleted the release-v5.10.0 branch August 17, 2021 02:42
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.

6 participants