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 v6.149.0 #7725

Merged
merged 28 commits into from
Sep 26, 2024
Merged

build: release v6.149.0 #7725

merged 28 commits into from
Sep 26, 2024

Conversation

kevin9foong
Copy link
Contributor

@kevin9foong kevin9foong commented Sep 26, 2024

New

  • build: merge release v6.148.0 to develop #7724
  • feat: approvals for mrf #7636
  • fix: coverall allow empty lcov #7722
  • chore: remove p-queue from be #7693
  • chore: add comments clarifying potentially confusing terms #7694
  • ci(Mergify): configuration update #7720
  • chore: Revert "chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.7.0" #7719
  • feat(tracking): mrf workflow + creation #7704
  • chore: remove unused deps #7685
  • fix: chromatic build failure #7684
  • build: release v6.148.0 #7683

Dependencies

  • fix(deps): bump libphonenumber-js from 1.11.8 to 1.11.9 in /shared #7713
  • fix(deps): bump express-rate-limit from 7.2.0 to 7.4.0 #7710
  • fix(deps): bump aws-sdk from 2.1659.0 to 2.1691.0 #7703
  • fix(deps): jest extended upgrade to 4.0.2 #7698
  • fix(deps): bump dotenv from 16.0.3 to 16.4.5 #7702
  • fix(deps): bump @aws-sdk/client-lambda from 3.414.0 to 3.654.0 #7701
  • fix(deps): bump axios from 1.7.4 to 1.7.7 #7699
  • fix(deps): bump opossum and @types/opossum #7593
  • fix(deps): bump neverthrow from 6.1.0 to 8.0.0 #7697
  • fix(deps): bump @opengovsg/sgid-client from 2.0.0 to 2.2.0 #7687

Dev-Dependencies

  • chore(deps-dev): bump @types/lodash from 4.17.7 to 4.17.9 in /shared #7717
  • chore(deps-dev): bump @babel/preset-env from 7.25.3 to 7.25.4 #7711
  • chore(deps-dev): bump @types/busboy from 1.5.3 to 1.5.4 #7709
  • chore(deps-dev): bump @stoplight/prism-cli from 5.5.4 to 5.10.0 #7708
  • chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.7.0 #7707
  • chore(deps-dev): bump eslint-plugin-prettier from 5.1.3 to 5.2.1 #7706
  • chore(deps-dev): bump @types/dedent from 0.7.0 to 0.7.2 #7696

Tests

feat(tracking): mrf workflow + creation #7704

@kevin9foong
Regression
Workflow can be added

  • Create an MRF
  • Add an email field
  • Click on Add Workflow
  • Assign email field to Step 1
  • Ensure that Step 1 "Save field" saves
  • Assign email field to Step 2
  • Ensure that Step 2 "Save field" saves

feat: approvals for mrf #7636

@KenLSM

For approvals:
Test set up:

  • Create an MRF form called 'finance claims approval'
  • Add 2 approval yes/no fields named 'RO approve', 'Finance dept approve'. Assert that Use for approvals badge appears beside yes/no fields in drawer.
  • Add 2 email fields
  • Assign 1 email field to step 1 to edit, Assign approval field to step 2 to edit and Assign approval field to step 3 to edit. (do not assign approval field or step 1 email notification field yet)
  • Let step 2 be static email, let step 3 be dynamic email field

TC1: Regression test - MRF still works

  • Open the form to public
  • Respond to form, ensure that all steps of mrf can be completed and result is in admin responses tab.
  • Assert no email outcomes are sent, since not yet configured in email notification settings.

TC2: Regression test - email notif works:

  • From TC1, config email notif setting to step 2 and static email of choice.
  • Complete submission, assert that workflow completed (note that it is not an outcome status email) is sent to expected emails.
  • Remove the email notifs to prepare for TC3.

TC3: Approve without email notif. Expect no email sent

  • Assign approval field to step 2 only.
  • Complete all 3 steps of mrf workflow and approve at step 2.
  • No email is sent.

TC4: Reject without email notif. Expect no email sent

  • Use same form from TC3
  • Reject at step 2 of mrf workflow.
  • No email is sent to step 3 respondent since workflow ends, no outcome email is sent.

TC5: Approve and reject with email notification works:

  • Add step 1 and step 3 to email notification and a static email to email notification.
  • Repeat TC3. Assert that only email from step 3 and static email receives approve email, since step 1 does not have email field setup.
  • Add email field to step 1 in workflow.
  • Repeat TC4. Assert step 1 and step 3 and static email receive "Not approved" email.

TC6: Multiple approval steps - approve all

  • From TC5, add approval step for step 3 of workflow.
  • Approve all approval steps, approve email should be received.

TC7: Multiple approval steps - Reject at step 2 (middle step)

  • From TC6, make submission
  • Reject at step 2, assert R3 does not receive email and "Not approved" email is sent to emails in the email notification fields.

TC8: Multiple approval steps - Reject at last step

  • From TC7, make submission
  • Approve at step 2 but Reject at step 3, assert "Not approved" email is sent to all emails in the email notification fields.

Edge cases:
TC10: approval field set to optional, respondent did not fill

  • From TC9, set the approval field used for step 2 as optional.
  • Try and submit the steps of form, but at step 2, do not fill in the optional approval field.
  • assert that R3 no longer gets the next step email, no completion/approval outcome emails are sent.
  • Visit the responses page, the R2 submission is recorded.
  • Share the next step response link, it goes to R3 and can be resumed.
  • Try and submit R3 and approve/reject, it should send out approved/reject email to expected emails.

TC10: approval field deleted, admin did not reassign

  • From TC9, delete the approval field used for step 2.
  • Try and submit the steps of the form.
  • assert that R3 no longer gets the next step email, no completion/approval outcome emails are sent.
  • Visit the responses page, the R2 submission is recorded.
  • Share the next step response link, it goes to R3 and can be resumed.
  • Try and submit R3 and approve/reject, it should send out approved/reject email to expected emails.

kevin9foong and others added 28 commits September 16, 2024 15:57
fix: add babel loader to fix chromatic es2018 failure
* chore: remove credits-generator, should use npx instead

* chore: remove unused deps
Bumps [@opengovsg/sgid-client](https://github.com/opengovsg/sgid-client) from 2.0.0 to 2.2.0.
- [Release notes](https://github.com/opengovsg/sgid-client/releases)
- [Commits](opengovsg/sgid-client@v2.0.0...v2.2.0)

---
updated-dependencies:
- dependency-name: "@opengovsg/sgid-client"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/dedent](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/dedent) from 0.7.0 to 0.7.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/dedent)

---
updated-dependencies:
- dependency-name: "@types/dedent"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [neverthrow](https://github.com/supermacro/neverthrow) from 6.1.0 to 8.0.0.
- [Release notes](https://github.com/supermacro/neverthrow/releases)
- [Changelog](https://github.com/supermacro/neverthrow/blob/master/CHANGELOG.md)
- [Commits](supermacro/neverthrow@v6.1.0...v8.0.0)

---
updated-dependencies:
- dependency-name: neverthrow
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [opossum](https://github.com/nodeshift/opossum) and [@types/opossum](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/opossum). These dependencies needed to be updated together.

Updates `opossum` from 7.1.0 to 8.1.4
- [Release notes](https://github.com/nodeshift/opossum/releases)
- [Changelog](https://github.com/nodeshift/opossum/blob/main/CHANGELOG.md)
- [Commits](nodeshift/opossum@v7.1.0...v8.1.4)

Updates `@types/opossum` from 6.2.3 to 8.1.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/opossum)

---
updated-dependencies:
- dependency-name: opossum
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/opossum"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.7.7.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.7.4...v1.7.7)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@aws-sdk/client-lambda](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-lambda) from 3.414.0 to 3.654.0.
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.654.0/clients/client-lambda)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-lambda"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.0.3 to 16.4.5.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v16.0.3...v16.4.5)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump jest-extended from 3.2.4 to 4.0.2

Bumps [jest-extended](https://github.com/jest-community/jest-extended) from 3.2.4 to 4.0.2.
- [Release notes](https://github.com/jest-community/jest-extended/releases)
- [Changelog](https://github.com/jest-community/jest-extended/blob/main/CHANGELOG.md)
- [Commits](jest-community/jest-extended@v3.2.4...v4.0.2)

---
updated-dependencies:
- dependency-name: jest-extended
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* fix: breaking changes

---------

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.1659.0 to 2.1691.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Commits](aws/aws-sdk-js@v2.1659.0...v2.1691.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.3 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…7707)

Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.5.0 to 29.7.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@stoplight/prism-cli](https://github.com/stoplightio/prism) from 5.5.4 to 5.10.0.
- [Release notes](https://github.com/stoplightio/prism/releases)
- [Changelog](https://github.com/stoplightio/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stoplightio/prism/commits)

---
updated-dependencies:
- dependency-name: "@stoplight/prism-cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/busboy](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/busboy) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/busboy)

---
updated-dependencies:
- dependency-name: "@types/busboy"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.2.0 to 7.4.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Commits](express-rate-limit/express-rate-limit@v7.2.0...v7.4.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
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.25.3 to 7.25.4.
- [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.25.4/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…7713)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.11.8 to 1.11.9.
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.8...v1.11.9)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…7717)

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

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add tracking action on create form

* add navbar trackers

* add save step tracking

* refactor: cleanup unused imports, use full const string for tracking names

* chore: upgrade dd browser-rum package

* chore: add new dd csp source

* chore: hack to extract dd_rum

* fix: datadog resetting due to re-imports

* chore: remove unnecessary export

* refactor: use proxy for more elegance

* chore: linting
….0 to 29.7.0" (#7719)

Revert "chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.7.0 (#…"

This reverts commit e265fa0.
* chore: add comments clarifying potentially confusing terms

* feat: remove undocumented param and return

---------

Co-authored-by: Kevin Foong <[email protected]>
* feat: add empty UT for approvals

* feat: add approval outcome email template

* feat: create common FormStepWithHeader component for editBlock items

* feat: approval toggle and field in edit workflow step block

* feat: enable saving of approval_step

* feat: add validation of approval field selection

* feat: add use for approvals badge for yes/no field

* feat: implement sending of approval emails in BE

* feat: validate that approval fields are yes/no on update

* fix: out of bounds index error when re-submitting mrf via response link

* fix: watch values needed for validation

* fix: add default values for sendMrfOutcomeEmails isApproval and isRejected

* feat: validate that approval field must be in same step's edit fields

* feat: log error when checkIsStepRejected fails

* fix: remove duplicates in email sending using uniq

* feat: create REST api for workflow steps

* feat: implement workflow step validation

* feat: display field deleted state

* chore: remove stray comment

* feat: clear value if deleted

* feat: add joi validation for mongodb objectId of hex and 24 length string

* fix: remove workflow from updateSettings

* feat: implement mrf builder v8

* feat: handle error message when admin does not select respondent type radio

* chore: improve rationale comment for getValueIfNotDeleted

* feat: make error badge more explicit by making it red

* feat: only display use for approvals badge for mrf

* feat: add storybook for FieldListDrawer to visual test use for approvals

* feat: add chromatic stories for mrf edit step block

* feat: add chromatic stories for inactive workflow builder state

* feat: add BE validation that first step of MRF workflow cannot be approval

* feat: add BE unit tests for approvals

* chore: add beta flags for approvals

* fix: chromatic visual nits

* feat: add header to mrf email notif

* fix: make workflow content info box 44px

* chore: Remove capitalisations for Outcome and Notifications to comply with design

* chore: remove unused props

* chore: remove stray _ in log action

* chore: remove unused imports

* fix: pr comments

* fix: use edit name across form

* feat: refactor mrf controller to move business logic to service

* feat: add UT for controller and service for mrf

* fix: remove throw error in map

* fix: allow empty lcov

---------

Co-authored-by: Ken <[email protected]>
build: merge release v6.148.0 to develop
@kevin9foong kevin9foong requested a review from KenLSM September 26, 2024 02:56
@KenLSM
Copy link
Contributor

KenLSM commented Sep 26, 2024

Unsure what does "expected" here means. Briefly checked the PRD, but it also doesn't fully ascribe who is expected

TC7:

  • Reject at step 2, assert R3 does not receive email and "Not approved" email is sent to expected emails.

R3 receives “Outcome email, but NOT “Request for approval email”

TC7:

  • Approve at step 2 but Reject at step 3, assert "Not approved" email is sent to all expected emails

R3 also receives “Outcome email, but NOT “Request for approval email”

@KenLSM KenLSM merged commit 89a6733 into release-al2 Sep 26, 2024
91 of 95 checks passed
@KenLSM KenLSM deleted the release_v6.149.0 branch September 26, 2024 05: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.

2 participants