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.80.0 #6773

Merged
merged 5 commits into from
Oct 4, 2023
Merged

build: release v6.80.0 #6773

merged 5 commits into from
Oct 4, 2023

Conversation

wanlingt
Copy link
Contributor

@wanlingt wanlingt commented Oct 4, 2023

New

  • feat: add index to myinfo child email response #6745
  • build: merge v6.79.0 into develop #6765
  • feat: add range validation to number field #6575
  • fix: missing errors in error mapper #6764
  • build: release v6.79.0 #6762

Dependencies

Dev-Dependencies

Tests

feat: add index to myinfo child email response #6745

@justynoh

Test for index - this can't be performed on Staging as the mockpass profiles only have 1 child, but can be tested locally

  • On a MyInfo form, add 2 child fields. Enable multiple children for the first child field
  • Open the form
  • For the first child field, add another child
  • Fill in the form (there should be 3 children entries in total) and submit it
  • The child fields in the email response should be numbered according to the child's index, e.g. [MyInfo] Child 1 Name

Regression test

  • Add all MyInfo fields to a form
  • Fill in the form and submit it
  • There should be no change in the format of the MyInfo field names, other than the child field. The child field (assuming there's just 1) should be named in this format [MyInfo] Child e.g. [MyInfo] Child 1 Name

feat: add range validation to number field #6575

@wanlingt
Manual tests for range validation:

  • E2E: Range validation works as expected.
    • Select Range of values allowed under Field restriction.
      • Submit the form without entering a minimum or maximum value. This should display an error.
      • Submit the form with input 0 for minimum or maximum value. This should display an error.
      • Submit the form with an invalid range where minimum >= maximum value. This should display an error.
      • Submit the form with only one of minimum and maximum value specified. This should work and create a number field as expected.
      • Submit the form with a valid range where minimum < maximum. This should work and create a number field as expected.

Regression tests (for EditNumber.tsx)

  • E2E: Try to create a number field with no selected validation. This should work and create a number field as expected.
  • E2E: Existing number validation still works as expected.
    • Select Number of characters allowed under Field restriction.
      • Submit the form without choosing length validation. This should display an error.
    • Select Min/Max/Exact for length validation.
      • Submit the form without an input for Number of characters. This should display an error.
      • Submit the form with 0 as the input. This should display an error.
      • Submit the form with a number > 0 as the input. This should work and create a number field as expected.

Deploy notes

New scripts:

  • migrate-number-field-schema.js: This script migrates ValidationOptions to ValidationOptions.LengthValidationOptions for all existing number form fields.

fix: missing errors in error mapper #6764

@wanlingt

  • Go to a storage mode form with at least 1 attachment field.
  • Open the network panel.
  • Make a submission with at least 1 attachment.
  • Copy the cURL request of the above submission.
  • In a terminal, paste this request and remove the file extensions in both the answer and the file field at the end. This is to simulate an invalid file extension (since there will be no file extensions).
  • Add the -I flag to the cURL request.
  • Enter the request. The status code should be 400 and the message should be "There is something wrong with your form submission. Please check your responses and try again. If the problem persists, please refresh the page."

LinHuiqing and others added 5 commits October 3, 2023 18:00
* feat: implement frontend and backend for range validation

* feat: improve error message clarity for range validation

* fix: add validation for invalid ranges

Implement additional validation in EditNumber.tsx to ensure invalid ranges cannot be filled.

* refactor: apply suggestions from code review

1. For selectedValidation, create new enum in the frontend and simplify shared enum values.
2. Rename rangeMinimum and rangeMaximum to customMin and customMax respectively.
3. Rewrite typeof checks to truthiness checks in backend validators.
4. Remove unnecessary '' from selectedLengthValidation

* feat: add mongodb script for schema migration

* fix: apply changes from code review

* fix: apply changes from code review

* fix: apply changes from code review

* feat: update backend tests to work on new NumberField schema

* chore: update frontend stories to work on new NumberField schema

* chore: update frontend tests to work on new NumberField schema

* chore: update backend schema, tests and validators

* chore: update and write new e2e tests

* feat: update frontend validation rules and add placeholder text

* chore: write new frontend tests

* test: expand heap size for frontend tests

---------

Co-authored-by: Justyn Oh <[email protected]>
build: merge v6.79.0 into develop
* feat: add index of child to myinfo email response

* feat: remove child index from getMyInfoChildHashKey

* fix: remove console.log statements

* fix: remove [Child] from myinfo child question name

* fix: rename child field question names

* fix: remove comment

* feat: account for case of >1 child per field

* fix: re-add childIdx to MyInfoChildHashKey for case of >1 child per field
@wanlingt wanlingt temporarily deployed to staging October 4, 2023 06:43 — with GitHub Actions Inactive
Copy link
Contributor

@LinHuiqing LinHuiqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @justynoh and @wanlingt for testing!

@wanlingt wanlingt merged commit 23e1dad into release-al2 Oct 4, 2023
66 of 69 checks passed
@wanlingt wanlingt deleted the release_v6.80.0 branch October 4, 2023 23:03
@LinHuiqing LinHuiqing mentioned this pull request Oct 5, 2023
51 tasks
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.

3 participants