diff --git a/public/locales/en.json b/public/locales/en.json index 7f07275c54..124f42c0aa 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -89,7 +89,7 @@ "createSampleOrganization": "Create Sample Organization", "description": "Description", "location": "Location", - "isPublic": "Is Public", + "userRegistrationRequired": "User Registration Required", "visibleInSearch": "Visible In Search", "displayImage": "Display Image", "enterName": "Enter Name", @@ -468,7 +468,7 @@ "description": "Description", "location": "Location", "displayImage": "Display Image", - "isPublic": "Public", + "userRegistrationRequired": "User Registration Required", "isVisibleInSearch": "Visible in Search", "saveChanges": "Save Changes", "enterNameOrganization": "Enter Organization Name", diff --git a/public/locales/fr.json b/public/locales/fr.json index b626994c5c..6ba909055a 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -88,7 +88,7 @@ "createSampleOrganization": "Créer une organisation d'exemple", "description": "La description", "location": "Emplacement", - "isPublic": "Est publique", + "userRegistrationRequired": "enregistrement requis", "visibleInSearch": "Visible dans la recherche", "displayImage": "Afficher l'image", "enterName": "Entrez le nom", @@ -465,7 +465,7 @@ "description": "La description", "location": "emplacement", "displayImage": "Afficher l'image", - "isPublic": "Public", + "userRegistrationRequired": "enregistrement requis", "isVisibleInSearch": "Visible dans la recherche", "saveChanges": "Sauvegarder les modifications", "enterNameOrganization": "Entrez le nom de l'organisation", diff --git a/public/locales/hi.json b/public/locales/hi.json index 5f272bad8f..b77d04a521 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -88,7 +88,7 @@ "createSampleOrganization": " सैंपल संगठन बनाएं", "description": "विवरण", "location": "स्थान", - "isPublic": "सार्वजनिक है", + "userRegistrationRequired": "उपयोगकर्ता पंजीकरण आवश्यक", "visibleInSearch": "खोज में दृश्यमान", "displayImage": "प्रदर्शन छवि", "enterName": "नाम दर्ज करें", @@ -464,7 +464,7 @@ "description": "विवरण", "location": "जगह", "displayImage": "प्रदर्शन छवि", - "isPublic": "सार्वजनिक", + "userRegistrationRequired": "उपयोगकर्ता पंजीकरण आवश्यक", "isVisibleInSearch": "खोज में दिखाए जा सकते हैं", "saveChanges": "परिवर्तनों को सुरक्षित करें", "cancel": "रद्द करना", diff --git a/public/locales/sp.json b/public/locales/sp.json index abf86c60dc..f742211e6e 100644 --- a/public/locales/sp.json +++ b/public/locales/sp.json @@ -88,7 +88,7 @@ "createSampleOrganization": "Crear organización de muestra", "description": "Descripción", "location": "Ubicación", - "isPublic": "Es público", + "userRegistrationRequired": "Registro de usuario requerido", "visibleInSearch": "Visible en la búsqueda", "displayImage": "Mostrar imagen", "enterName": "Ingrese su nombre", @@ -464,7 +464,7 @@ "description": "Descripción", "location": "ubicación", "displayImage": "Mostrar imagen", - "isPublic": "Público", + "userRegistrationRequired": "Registro de usuario requerido", "isVisibleInSearch": "Visible en la búsqueda", "saveChanges": "Guardar cambios", "cancel": "Cancelar", diff --git a/public/locales/zh.json b/public/locales/zh.json index 30a048d1be..c234127889 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -88,7 +88,7 @@ "createSampleOrganization": "创建示范组织", "description": "描述", "location": "地點", - "isPublic": "是否公開", + "isPubluserRegistrationRequiredic": "需要用户注册", "visibleInSearch": "在搜索中可見", "displayImage": "顯示圖像", "enterName": "输入名字", @@ -464,7 +464,7 @@ "description": "描述", "location": "地點", "displayImage": "顯示圖像", - "isPublic": "公开", + "userRegistrationRequired": "需要用户注册", "isVisibleInSearch": "在搜索中可见", "saveChanges": "保存更改", "cancel": "取消", diff --git a/src/components/OrgUpdate/OrgUpdate.test.tsx b/src/components/OrgUpdate/OrgUpdate.test.tsx index 79b076c452..09fabc45de 100644 --- a/src/components/OrgUpdate/OrgUpdate.test.tsx +++ b/src/components/OrgUpdate/OrgUpdate.test.tsx @@ -54,21 +54,22 @@ describe('Testing Organization Update', () => { expect(screen.getByText('Description')).toBeInTheDocument(); expect(screen.getByText('Location')).toBeInTheDocument(); expect(screen.getByText('Display Image:')).toBeInTheDocument(); - expect(screen.getByText('Public:')).toBeInTheDocument(); + expect(screen.getByText(/Registration/)).toBeInTheDocument(); expect(screen.getByText('Visible in Search:')).toBeInTheDocument(); // Get the input fields, and btns const name = screen.getByPlaceholderText(/Enter Organization Name/i); const des = screen.getByPlaceholderText(/Description/i); const location = screen.getByPlaceholderText(/Location/i); - const isPublic = screen.getByPlaceholderText(/Public/i); + const userRegistrationRequired = + screen.getByPlaceholderText(/Registration/i); const isVisible = screen.getByPlaceholderText(/Visible/i); // Checking if form fields got updated according to the mock data expect(name).toHaveValue('Palisadoes'); expect(des).toHaveValue('Equitable Access to STEM Education Jobs'); expect(location).toHaveValue('Jamaica'); - expect(isPublic).toBeChecked(); + expect(userRegistrationRequired).toBeChecked(); expect(isVisible).not.toBeChecked(); }); @@ -90,7 +91,8 @@ describe('Testing Organization Update', () => { const des = screen.getByPlaceholderText(/Description/i); const location = screen.getByPlaceholderText(/Location/i); const displayImage = screen.getByPlaceholderText(/Display Image/i); - const isPublic = screen.getByPlaceholderText(/Public/i); + const userRegistrationRequired = + screen.getByPlaceholderText(/Registration/i); const isVisible = screen.getByPlaceholderText(/Visible/i); const saveChangesBtn = screen.getByText(/Save Changes/i); @@ -104,7 +106,7 @@ describe('Testing Organization Update', () => { userEvent.type(des, formData.description); userEvent.type(location, formData.location); userEvent.upload(displayImage, formData.displayImage); - userEvent.click(isPublic); + userEvent.click(userRegistrationRequired); userEvent.click(isVisible); await wait(); @@ -115,7 +117,7 @@ describe('Testing Organization Update', () => { expect(des).toHaveValue(formData.description); expect(location).toHaveValue(formData.location); expect(displayImage).toBeTruthy(); - expect(isPublic).not.toBeChecked(); + expect(userRegistrationRequired).not.toBeChecked(); expect(isVisible).toBeChecked(); }); @@ -151,7 +153,8 @@ describe('Testing Organization Update', () => { const des = screen.getByPlaceholderText(/Description/i); const location = screen.getByPlaceholderText(/Location/i); const displayImage = screen.getByPlaceholderText(/Display Image/i); - const isPublic = screen.getByPlaceholderText(/Public/i); + const userRegistrationRequired = + screen.getByPlaceholderText(/Registration/i); const isVisible = screen.getByPlaceholderText(/Visible/i); const saveChangesBtn = screen.getByText(/Save Changes/i); @@ -165,7 +168,7 @@ describe('Testing Organization Update', () => { userEvent.type(des, formData.description); userEvent.type(location, formData.location); userEvent.upload(displayImage, formData.displayImage); - userEvent.click(isPublic); + userEvent.click(userRegistrationRequired); userEvent.click(isVisible); await wait(); diff --git a/src/components/OrgUpdate/OrgUpdate.tsx b/src/components/OrgUpdate/OrgUpdate.tsx index 16222717d6..cf1a1b22cc 100644 --- a/src/components/OrgUpdate/OrgUpdate.tsx +++ b/src/components/OrgUpdate/OrgUpdate.tsx @@ -165,9 +165,11 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element { /> - {t('isPublic')}: + + {t('userRegistrationRequired')}: + setPublicChecked(!publicchecked)} /> diff --git a/src/screens/OrgList/OrgList.test.tsx b/src/screens/OrgList/OrgList.test.tsx index 35acc85c45..bf629d5f4e 100644 --- a/src/screens/OrgList/OrgList.test.tsx +++ b/src/screens/OrgList/OrgList.test.tsx @@ -167,7 +167,7 @@ describe('Organisations Page testing as SuperAdmin', () => { formData.description ); userEvent.type(screen.getByPlaceholderText(/Location/i), formData.location); - userEvent.click(screen.getByTestId(/isPublic/i)); + userEvent.click(screen.getByTestId(/userRegistrationRequired/i)); userEvent.click(screen.getByTestId(/visibleInSearch/i)); userEvent.upload(screen.getByLabelText(/Display Image/i), formData.image); @@ -180,7 +180,7 @@ describe('Organisations Page testing as SuperAdmin', () => { expect(screen.getByPlaceholderText(/Location/i)).toHaveValue( formData.location ); - expect(screen.getByTestId(/isPublic/i)).not.toBeChecked(); + expect(screen.getByTestId(/userRegistrationRequired/i)).not.toBeChecked(); expect(screen.getByTestId(/visibleInSearch/i)).toBeChecked(); expect(screen.getByLabelText(/Display Image/i)).toBeTruthy(); @@ -228,7 +228,7 @@ describe('Organisations Page testing as SuperAdmin', () => { formData.description ); userEvent.type(screen.getByPlaceholderText(/Location/i), formData.location); - userEvent.click(screen.getByTestId(/isPublic/i)); + userEvent.click(screen.getByTestId(/userRegistrationRequired/i)); userEvent.click(screen.getByTestId(/visibleInSearch/i)); userEvent.upload(screen.getByLabelText(/Display Image/i), formData.image); @@ -241,7 +241,7 @@ describe('Organisations Page testing as SuperAdmin', () => { expect(screen.getByPlaceholderText(/Location/i)).toHaveValue( formData.location ); - expect(screen.getByTestId(/isPublic/i)).not.toBeChecked(); + expect(screen.getByTestId(/userRegistrationRequired/i)).not.toBeChecked(); expect(screen.getByTestId(/visibleInSearch/i)).toBeChecked(); expect(screen.getByLabelText(/Display Image/i)).toBeTruthy(); diff --git a/src/screens/OrgList/OrgList.tsx b/src/screens/OrgList/OrgList.tsx index 72058e8d96..36e7bcdc7c 100644 --- a/src/screens/OrgList/OrgList.tsx +++ b/src/screens/OrgList/OrgList.tsx @@ -543,10 +543,12 @@ function orgList(): JSX.Element { - {t('isPublic')} + + {t('userRegistrationRequired')} +