From cb0d9b2de43678d5bdbf3defd53a4fc0c2e77161 Mon Sep 17 00:00:00 2001 From: scottheng96 Date: Fri, 15 Nov 2024 16:18:47 +0800 Subject: [PATCH 1/2] replace Question with Field Name for relevant fields --- .../edit-fieldtype/EditAttachment/EditAttachment.tsx | 2 +- .../edit-fieldtype/EditCheckbox/EditCheckbox.tsx | 2 +- .../edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditDate/EditDate.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditDecimal/EditDecimal.tsx | 2 +- .../edit-fieldtype/EditDropdown/EditDropdown.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditHomeno/EditHomeno.tsx | 2 +- .../edit-fieldtype/EditLongText/EditLongText.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditNric.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditRating/EditRating.tsx | 2 +- .../edit-fieldtype/EditShortText/EditShortText.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditUen.tsx | 2 +- .../EditFieldDrawer/edit-fieldtype/EditYesNo.tsx | 2 +- .../i18n/locales/features/admin-form/sidebar/fields/en-sg.ts | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx index cd3452cf40..cdedaa7311 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditAttachment/EditAttachment.tsx @@ -154,7 +154,7 @@ export const EditAttachment = ({ field }: EditAttachmentProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCheckbox/EditCheckbox.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCheckbox/EditCheckbox.tsx index 33b9bc76fb..36da3bc6cd 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCheckbox/EditCheckbox.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCheckbox/EditCheckbox.tsx @@ -213,7 +213,7 @@ export const EditCheckbox = ({ field }: EditCheckboxProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx index d8a4e44236..57e4a31f11 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditCountryRegion/EditCountryRegion.tsx @@ -69,7 +69,7 @@ export const EditCountryRegion = ({ return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDate/EditDate.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDate/EditDate.tsx index b936b3fff5..920fa62f32 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDate/EditDate.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDate/EditDate.tsx @@ -261,7 +261,7 @@ export const EditDate = ({ field }: EditDateProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDecimal/EditDecimal.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDecimal/EditDecimal.tsx index 182bf0ecd0..2e1921e354 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDecimal/EditDecimal.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDecimal/EditDecimal.tsx @@ -98,7 +98,7 @@ export const EditDecimal = ({ field }: EditDecimalProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDropdown/EditDropdown.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDropdown/EditDropdown.tsx index 6ff75b5246..91e7a78999 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDropdown/EditDropdown.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditDropdown/EditDropdown.tsx @@ -75,7 +75,7 @@ export const EditDropdown = ({ field }: EditDropdownProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx index cfcf6f2772..047a0896ad 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditEmail/EditEmail.tsx @@ -155,7 +155,7 @@ export const EditEmail = ({ field }: EditEmailProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditHomeno/EditHomeno.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditHomeno/EditHomeno.tsx index 2d61f612b4..06732ac4a2 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditHomeno/EditHomeno.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditHomeno/EditHomeno.tsx @@ -54,7 +54,7 @@ export const EditHomeno = ({ field }: EditHomenoProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditLongText/EditLongText.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditLongText/EditLongText.tsx index 24471133b4..9da359808a 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditLongText/EditLongText.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditLongText/EditLongText.tsx @@ -130,7 +130,7 @@ export const EditLongText = ({ field }: EditLongTextProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx index 6ce472f634..386bd4df43 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx @@ -60,7 +60,7 @@ export const EditMobile = ({ field }: EditMobileProps): JSX.Element => { isReadOnly={isLoading} isInvalid={!!errors.title} > - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditNric.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditNric.tsx index be60cde8d8..d117e03b33 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditNric.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditNric.tsx @@ -47,7 +47,7 @@ export const EditNric = ({ field }: EditNricProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditRating/EditRating.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditRating/EditRating.tsx index e4ca5a6b79..ad23ba2448 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditRating/EditRating.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditRating/EditRating.tsx @@ -65,7 +65,7 @@ export const EditRating = ({ field }: EditRatingProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditShortText/EditShortText.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditShortText/EditShortText.tsx index fceda2a14c..2da802921b 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditShortText/EditShortText.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditShortText/EditShortText.tsx @@ -175,7 +175,7 @@ export const EditShortText = ({ field }: EditShortTextProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditUen.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditUen.tsx index 9737a0e706..b580ebac15 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditUen.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditUen.tsx @@ -47,7 +47,7 @@ export const EditUen = ({ field }: EditUenProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditYesNo.tsx b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditYesNo.tsx index 275e93f752..be83ad820f 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditYesNo.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditYesNo.tsx @@ -50,7 +50,7 @@ export const EditYesNo = ({ field }: EditYesNoProps): JSX.Element => { return ( - Question + Field Name {errors?.title?.message} diff --git a/frontend/src/i18n/locales/features/admin-form/sidebar/fields/en-sg.ts b/frontend/src/i18n/locales/features/admin-form/sidebar/fields/en-sg.ts index 43c48ad88f..99bc3c1770 100644 --- a/frontend/src/i18n/locales/features/admin-form/sidebar/fields/en-sg.ts +++ b/frontend/src/i18n/locales/features/admin-form/sidebar/fields/en-sg.ts @@ -28,7 +28,7 @@ export const enSG: Fields = { children: 'Children', }, commonFieldComponents: { - title: 'Question', + title: 'Field Name', description: 'Description', required: 'Required', noCharactersAllowed: 'Number of characters allowed', From 2e5911a55682445101fc8a79cb8959bb91379f4a Mon Sep 17 00:00:00 2001 From: scottheng96 Date: Mon, 18 Nov 2024 15:41:33 +0800 Subject: [PATCH 2/2] update e2e tests --- __tests__/e2e/helpers/createForm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/e2e/helpers/createForm.ts b/__tests__/e2e/helpers/createForm.ts index aa2964dc3f..fb34977d0a 100644 --- a/__tests__/e2e/helpers/createForm.ts +++ b/__tests__/e2e/helpers/createForm.ts @@ -452,7 +452,7 @@ const addBasicField = async ( } // Images and Statements don't have titles } else { - await page.getByLabel('Question').fill(field.title) + await page.getByLabel('Field Name').fill(field.title) } // Toggle required for input fields except Table field (required toggled for individual columns)