From 47d0b389ae59bfd8cca8a6f8bf12438f90e63c19 Mon Sep 17 00:00:00 2001 From: Ivo Branco Date: Thu, 5 Dec 2024 18:00:16 +0000 Subject: [PATCH] fix: modal tos text Fix the modal terms of service text to be compliance with GDPR. Enlarge the modal size so the bigger text is shown with better style. fccn/nau-technical#367 --- src/components/modal-tos/ModalToS.jsx | 8 +++----- src/components/modal-tos/ModalToS.test.jsx | 4 ++-- src/i18n/messages/pt_PT.json | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/modal-tos/ModalToS.jsx b/src/components/modal-tos/ModalToS.jsx index 23d63ddcd..86fca904f 100644 --- a/src/components/modal-tos/ModalToS.jsx +++ b/src/components/modal-tos/ModalToS.jsx @@ -29,7 +29,6 @@ const ModalToS = () => { const { MODAL_UPDATE_TERMS_OF_SERVICE, PRIVACY_POLICY_URL, - SITE_NAME, TERMS_OF_SERVICE_URL, TOS_AND_HONOR_CODE, } = getConfig(); @@ -92,6 +91,7 @@ const ModalToS = () => { isOpen={isOpen} onClose={close} hasCloseButton={false} + size="lg" > {title[lang] && ( @@ -127,10 +127,9 @@ const ModalToS = () => { createTOSLink(chunks, TERMS_OF_SERVICE_URL), - platformName: SITE_NAME, }} /> @@ -141,10 +140,9 @@ const ModalToS = () => { createTOSLink(chunks, TOS_AND_HONOR_CODE), - platformName: SITE_NAME, }} /> diff --git a/src/components/modal-tos/ModalToS.test.jsx b/src/components/modal-tos/ModalToS.test.jsx index 21292e235..cd7491fdb 100644 --- a/src/components/modal-tos/ModalToS.test.jsx +++ b/src/components/modal-tos/ModalToS.test.jsx @@ -117,7 +117,7 @@ describe('ModalTOS Component', () => { expect(button).toBeDisabled(); const privacyCheckbox = screen.getByLabelText(/Privacy Policy/i); - const termsCheckbox = screen.getByLabelText(/Terms of Service/i, { selector: 'input' }); + const termsCheckbox = screen.getByLabelText(/Terms and Conditions/i, { selector: 'input' }); fireEvent.click(privacyCheckbox); // Click first checkbox expect(button).toBeDisabled(); // Button should still be disabled @@ -134,7 +134,7 @@ describe('ModalTOS Component', () => { await waitFor(() => screen.getByText(/Attention/i)); const privacyCheckbox = screen.getByLabelText(/Privacy Policy/i); - const termsCheckbox = screen.getByLabelText(/Terms of Service/i, { selector: 'input' }); + const termsCheckbox = screen.getByLabelText(/Terms and Conditions/i, { selector: 'input' }); // Check all checkboxes fireEvent.click(privacyCheckbox); diff --git a/src/i18n/messages/pt_PT.json b/src/i18n/messages/pt_PT.json index e3efa774b..f810af5bf 100644 --- a/src/i18n/messages/pt_PT.json +++ b/src/i18n/messages/pt_PT.json @@ -3,7 +3,7 @@ "footer.languageForm.submit.label": "Aplicar", "footer.copyright.message": "Todos os direitos reservados.", "modalToS.dataAuthorization.checkbox.label": "Li e compreendi a Política de Privacidade", - "modalToS.termsOfService.checkbox.label": "Li e compreendi o {platformName} Termos e Condições", - "modalToS.honorCode.checkbox.label": "Li e compreendi o {platformName} Honor Code", + "modalToS.termsOfService.checkbox.label": "Li, compreendi e aceito os Termos e Condições", + "modalToS.honorCode.checkbox.label": "Li e compreendi o Código de Honra", "modalToS.acceptance.button": "Aceito os novos termos de serviço" }