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.166.0 #7945

Merged
merged 18 commits into from
Nov 26, 2024
Merged

build: release v6.166.0 #7945

merged 18 commits into from
Nov 26, 2024

Conversation

kevin9foong
Copy link
Contributor

@kevin9foong kevin9foong commented Nov 26, 2024

New

  • feat(mrf): conditional routing #7804
  • fix: trim text input before sending to backend #7937
  • test(story): add chromatic story to ensure thankyou page renders #7264
  • chore: remove unused deps #7906
  • feat(i18n): extract text from admin-form prompts #7931
  • chore(FE): cleanup date check on sex field #7922
  • chore(FE): use consistent vite port for dev with README #7930
  • feat(i18n): move workspace relative date format #7929
  • build: release v6.165.0 #7928
  • build: release v6.165.0 #7927
  • feat(i18n): extract text for form metadata #7926

Dependencies

  • fix(deps): bump libphonenumber-js from 1.11.14 to 1.11.15 in /shared #7936

Dev-Dependencies

  • chore(deps-dev): bump @playwright/test from 1.45.1 to 1.49.0 #7923

Tests

feat(mrf): conditional routing #7804

TC1: Conditional routing works for single email per option and multiple emails per option

  • Create an mrf form.
  • Create a second step and set the 2nd step respondent to conditional routing.
  • Update the 2nd step options to emails mapping
  • Select a dropdown field (with >= 3 options) and upload a valid options to emails mapping (try 1 option to multiple emails in the csv, specifically, 1 option to 1 email field, 1 option to 2 email fields and 1 option to 3 email fields). Ensure this dropdown field is assigned to step 1 for editing.
  • Try to download the csv mapping from step 2 edit page after uploading the csv. Ensure that the downloaded csv displays the same options to mapping as what was uploaded.
  • Add a third step with respondent set to dynamic aka email field.
  • Make the form public
  • Submit and complete all workflow steps
  • Ensure the email recipient for each step is correct (eg, sends to correct email specified in uploaded csv file based on dropdown field selected)
  • Repeat submitting through the steps for all the options of the conditional field to check next step email is sent to the correct email recipient.

TC2: Selecting same dropdown field for multiple conditional routing steps

  • Continue from TC1.
  • Update step 3 respondent to conditional routing. Choose the same dropdown field as step 2.
  • Ensure the options to email mappings already exists and dont need to upload.
  • Try to submit all steps of the form. Ensure that the next step emails are sent to the correct email recipients based on the dropdown options selected in the submission response.

TC3: Email notifications work with conditional routing

  • Continue from TC2.
  • Enable email notifications for the MRF form and set step 2 to receive email notifications.
  • Complete the workflow and ensure that the email recipient based on the option for dropdown field for step 2 receives the outcome email.

TC4: Deleting the dropdown field options to email mapping shows error message

  • Continue from TC3
  • Delete the emails to options mapping by editing step 2 of the workflow.
  • Change step 2 to static / fixed email respondent and save.
  • Ensure that step 3 now shows an error message in the inactive state of the workflow builder.
  • Try to submit all steps of the form without updating step 3.
  • Assert that no next step email is sent for step 3.

TC5: Uploading invalid options

  • Continue from TC4.
  • Go to edit step 3 in the workflow builder.
  • Try to upload a options to email csv which contains missing options compared to the selected field options.
  • Assert an error is displayed and cannot upload.
  • Try to upload csv which contains duplicate options rows.
  • Assert an error is displayed and cannot upload.
  • Try to upload csv which have a row with missing options col but filled emails col.
  • Assert an error is displayed and cannot upload.
  • Try to upload csv which have a row with missing email col but filled options col.
  • Assert an error is displayed and cannot upload.
  • Try to upload csv which has email that is not valid eg, abc in email col
  • Assert an error is displayed and cannot upload.

chore: remove unused deps #7906

Regression

Landing page renders
  • Ensure that landing page renders

kevin9foong and others added 18 commits November 19, 2024 15:46
build: merge release v6.164.0 to develop
… 8.15.0 in /shared (#7912)

chore(deps-dev): bump @typescript-eslint/eslint-plugin in /shared

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.14.0 to 8.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.15.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  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 [@aws-sdk/client-lambda](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-lambda) from 3.654.0 to 3.693.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.693.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>
… in /shared (#7911)

chore(deps-dev): bump @typescript-eslint/parser in /shared

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.14.0 to 8.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.15.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  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>
… approvals (#7920)

* chore: remove beta flag for mrfEmailNotifications and approvals

* chore: retain flag
Extract labels for form metadata, namely last modified data
and form type

[i18n]
- Add Meta section to `adminForm`

[features]
- Replace constants file with i18n equivalent mapping of type labels
* chore(FE): use consistent vite port for dev with README

* docs: reflect vite's default on README
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.45.1 to 1.49.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.1...v1.49.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  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>
…7936)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.11.14 to 1.11.15.
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.14...v1.11.15)

---
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>
* feat(i18n): extract text from modals

* feat(i18n): extract text from admin-form toasts
* chore: remove unused debounce

* chore: remove unused webpack

chore: remove unused worker-loader

chore: update readme to exclude webpack issues

chore: remove unused regenerator

chore: remove unused puppeteer

chore: remove nocache

chore: remove @types/jsonfile
* fix: trim text input before sending to backend

* fix: make comment more terse and fix typo

* chore: use flow to prevent nested function calls
* feat: add cond routing type and modal to workflow builder

* feat: add step 2 modal content

* feat: add step 3 modal content

* feat: add attachment box under radio button and fix modal interaction

* feat: allow save conditional workflow step

* feat: allow download of csv edit file

* feat: set up fe component

* feat: store optionsToFieldsMap in dropdown

* feat: add be email routing for conditional routing

* feat: move conditional field to main form and update modal to 2 step

* feat: add be routing for conditional routing

* feat: add spacing for cond routing, fix inactive state undefined error

* feat: create endpoint for updating dropdown mapping

* feat: update attachment state when singleselect changes

* feat: add FE validation for CSV

* feat: add validation at the workflow block

* feat: update positioning of error message, modal copy and update fe cache

* feat: use state instead of using the same form state

* feat: implement download csv

* feat: add error message to inactive step block

* feat: add warning text to dropdown

* fix: build errors

* feat: clear error on button press and update error copy

* feat: conditionally show dropdown edit warning if cond routing

* fix: validation of options

* feat: add warning in inactive step block for mismatched options

* feat: add be validation for mapping

* chore: remove stray console log

* chore: remove step number from modal

* chore: update error message copy

* feat: add tc for validation

* feat: add tc for conditional fetch email

* feat: add tc for updating options mapping

* chore: remove unused import

* chore: add beta flag for cond routing

* fix: move isDisabled to radiogroup to bypass undefined re-render issue

* feat: add tc for edit step block

* feat: active and inactive step block chromatic stories

* feat: edit dropdown stories

* feat: add stories for conditional routing option modal

* chore: expose subroutine errors

* chore: add field validation test

* chore: remove unused prop

* fix: reduce usage of watch to getValues, refactor variables

* chore: move conditional-routing-example.png to the same folder as usage for colocation

* fix: remove renderHook from stories which is not supported

* fix: import image directly instead of using path

* chore: refactor respondent block into smaller components

* feat: move csv template parsing for header to common function

* feat: add rationale for attaching mapping to field instead of step

* chore: remove multiple string duplicates by shifting into getFileName function

* feat: add trimming of email

* feat: add trimming of email during validation

* fix: display update error if no mapping for selected cond field

* fix: cannot change respondent type bug

* chore: add info logs if no target emails found

* fix: remove word template from modal

* fix: copy changes and bugs

* feat: disable modal step 2 before csv template downloaded

* fix: chromatic stories to reflect new changes

* fix: prettier formatting

* fix: add . to error message

---------

Co-authored-by: Ken <[email protected]>
@datadog-opengovsg
Copy link

Datadog Report

Branch report: release_v6.166.0
Commit report: c51e807
Test service: formsg

✅ 0 Failed, 287 Passed, 0 Skipped, 1m 52.21s Total duration (5m 19.43s time saved)

@kevin9foong kevin9foong merged commit ea8401c into release-al2 Nov 26, 2024
75 of 76 checks passed
@kevin9foong kevin9foong deleted the release_v6.166.0 branch November 26, 2024 06:38
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