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

fix: update the form field type for v3 test cases #7787

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

kevin9foong
Copy link
Contributor

Problem

Due to the update in the type that the fieldValidatorV3 argument accepts, the test case types are mismatched.

Closes FRM-1881

Solution

Update the formfield to use defaultFieldGenerator which casts the type to FormFieldDto

Breaking Changes

  • No - this PR is backwards compatible

Copy link

linear bot commented Oct 17, 2024

@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Oct 17, 2024

Datadog Report

Branch report: fix/update-mrf-be-validation-type
Commit report: ba8373a
Test service: formsg

✅ 0 Failed, 26 Passed, 0 Skipped, 27.06s Total duration (11m 34s time saved)

@kevin9foong kevin9foong self-assigned this Oct 17, 2024
attachmentSize: AttachmentSize.OneMb,
})
}) as FormFieldDto
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this typecasting still required since generateDefaultFieldV3 returns FormFieldDto

Copy link
Contributor Author

@kevin9foong kevin9foong Oct 17, 2024

Choose a reason for hiding this comment

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

I missed out the removal of this cast as that was my initial solution before deciding to make a common generateDefaultFieldV3 function. Thanks for the catch!

Copy link
Contributor

@KenLSM KenLSM left a comment

Choose a reason for hiding this comment

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

LGTM!

@kevin9foong kevin9foong merged commit 5f2dd9f into develop Oct 18, 2024
15 checks passed
@kevin9foong kevin9foong deleted the fix/update-mrf-be-validation-type branch October 18, 2024 07:29
@KenLSM KenLSM mentioned this pull request Oct 20, 2024
43 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.

2 participants