diff --git a/client/compiled-lang/en.json b/client/compiled-lang/en.json index 69eec85b..f9f50bff 100644 --- a/client/compiled-lang/en.json +++ b/client/compiled-lang/en.json @@ -479,6 +479,12 @@ "value": "Census tract feedback" } ], + "contact.page.fab.survey.link": [ + { + "type": 0, + "value": "https://www.surveymonkey.com/r/cejst-survey" + } + ], "contact.page.fab.survey.text": [ { "type": 0, @@ -514,7 +520,7 @@ "contact.page.request.for.info.box.title": [ { "type": 0, - "value": "Request for Infomation" + "value": "Request for Information" } ], "contact.page.sub.header.text": [ diff --git a/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap b/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap index 55acbd91..fde2dcb6 100644 --- a/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap +++ b/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap @@ -220,17 +220,21 @@ exports[`J40Footer renders correctly 1`] = ` class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/components/Language/Language.tsx b/client/src/components/Language/Language.tsx index 2e857f35..d99ad738 100644 --- a/client/src/components/Language/Language.tsx +++ b/client/src/components/Language/Language.tsx @@ -21,7 +21,6 @@ interface ILanguageProps { * @return {JSX.Element | null} */ const Language = ({isDesktop}:ILanguageProps) => { - return (
{'language @@ -40,7 +39,7 @@ const Language = ({isDesktop}:ILanguageProps) => { }
- ) + ); }; export default Language; diff --git a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap index 37abc432..1684d743 100644 --- a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap +++ b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap @@ -12,7 +12,7 @@ exports[`rendering of the RequestForInfo checks if component renders 1`] = `

- Request for Infomation + Request for Information

{ const {asFragment} = render( @@ -14,8 +14,3 @@ describe('rendering of the SurveyButton', () => { expect(asFragment()).toMatchSnapshot(); }); }); -describe('test clickHandler', () => { - it('clickHandler should fire successfully', () => { - onClickHandler(); - }); -}); diff --git a/client/src/components/SurveyButton/SurveyButton.tsx b/client/src/components/SurveyButton/SurveyButton.tsx index 8b6883ad..1f549866 100644 --- a/client/src/components/SurveyButton/SurveyButton.tsx +++ b/client/src/components/SurveyButton/SurveyButton.tsx @@ -9,26 +9,24 @@ import J40MainGridContainer from '../J40MainGridContainer'; // @ts-ignore import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg'; -export const onClickHandler = () => { - Object.assign(document.createElement('a'), {target: '_blank', href: 'https://www.surveymonkey.com/r/cejst-survey'}).click(); -}; - const SurveyButton = () => { const intl = useIntl(); + const href = intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_URL); return ( - + + + ); }; diff --git a/client/src/components/SurveyButton/__snapshots__/SurveyButton.test.tsx.snap b/client/src/components/SurveyButton/__snapshots__/SurveyButton.test.tsx.snap index bd5df330..e1285b19 100644 --- a/client/src/components/SurveyButton/__snapshots__/SurveyButton.test.tsx.snap +++ b/client/src/components/SurveyButton/__snapshots__/SurveyButton.test.tsx.snap @@ -6,17 +6,21 @@ exports[`rendering of the SurveyButton checks if component renders 1`] = ` class="grid-container-desktop-lg" data-testid="gridContainer" > - + +
`; diff --git a/client/src/data/copy/contact.tsx b/client/src/data/copy/contact.tsx index 905f9b2d..efac0f5a 100644 --- a/client/src/data/copy/contact.tsx +++ b/client/src/data/copy/contact.tsx @@ -6,7 +6,6 @@ import * as COMMON_COPY from './common'; import {PAGES_ENDPOINTS} from '../constants'; import {FOOTER} from './common'; - export const PAGE_INTRO = defineMessages({ PAGE_TILE: { id: 'contact.page.title.text', @@ -33,12 +32,17 @@ export const PAGE_INTRO = defineMessages({ defaultMessage: `Help improve the site & data`, description: 'Navigate to the contact page, this is the text for floating action button', }, + SURVEY_URL: { + id: 'contact.page.fab.survey.link', + defaultMessage: 'https://www.surveymonkey.com/r/cejst-survey', + description: 'Localized link to the survey. Spanish link is https://www.surveymonkey.com/r/cejst-survey-es', + }, }); export const RFI_BOX = defineMessages({ TITLE: { id: 'contact.page.request.for.info.box.title', - defaultMessage: 'Request for Infomation', + defaultMessage: 'Request for Information', description: 'Navigate to the contact page, this is the title of the request for information box', }, }); @@ -82,9 +86,10 @@ export const CENSUS_TRACT_FEEDBACK = { defaultMessage={` In addition, you can provide feedback on the tool via this survey. `} - description={'Navigate to the contact page, this is the census tract feedback section'} + description={'Navigate to the survey. Spanish should substitute to get Spanish link! Already coded to support'} values={{ link1: COMMON_COPY.linkFn('https://www.surveymonkey.com/r/cejst-survey', false, true), + link2: COMMON_COPY.linkFn('https://www.surveymonkey.com/r/cejst-survey-es', false, true), }} />, }; diff --git a/client/src/intl/en.json b/client/src/intl/en.json index 22eb7860..fbef6c4b 100644 --- a/client/src/intl/en.json +++ b/client/src/intl/en.json @@ -233,12 +233,16 @@ }, "contact.page.census.tract.feedback.para3": { "defaultMessage": "In addition, you can provide feedback on the tool via this survey.", - "description": "Navigate to the contact page, this is the census tract feedback section" + "description": "Navigate to the survey. Spanish should substitute to get Spanish link! Already coded to support" }, "contact.page.census.tract.feedback.title": { "defaultMessage": "Census tract feedback", "description": "Navigate to the contact page, this is the census tract feedback section" }, + "contact.page.fab.survey.link": { + "defaultMessage": "https://www.surveymonkey.com/r/cejst-survey", + "description": "Localized link to the survey. Spanish link is https://www.surveymonkey.com/r/cejst-survey-es" + }, "contact.page.fab.survey.text": { "defaultMessage": "Help improve the site & data", "description": "Navigate to the contact page, this is the text for floating action button" @@ -252,7 +256,7 @@ "description": "Navigate to the contact page, this is the body of the request for information box" }, "contact.page.request.for.info.box.title": { - "defaultMessage": "Request for Infomation", + "defaultMessage": "Request for Information", "description": "Navigate to the contact page, this is the title of the request for information box" }, "contact.page.sub.header.text": { diff --git a/client/src/intl/es.json b/client/src/intl/es.json index 759d8c46..72c3ccdb 100644 --- a/client/src/intl/es.json +++ b/client/src/intl/es.json @@ -56,9 +56,10 @@ "common.pages.header.tsd": "Documento de apoyo técnico", "contact.page.census.tract.feedback.para1": "Para proporcionar comentarios sobre un grupo de bloques del censo específico, seleccione el botón de enviar comentarios después de escoger un bloque del censo en la página Explore la herramienta o utilice la dirección de correo electrónico que se proporciona arriba. Incluya la identificación de un grupo de bloques del censo, el condado y la información del estado o el territorio, junto con sus comentarios.", "contact.page.census.tract.feedback.para2": "Si existen indicadores de datos específicos que podrían mejorarse o cambiarse, incluya esa información en el cuerpo del correo electrónico.", - "contact.page.census.tract.feedback.para3": "Además, puede proporcionar comentarios en la herramienta mediante este enlace.", + "contact.page.census.tract.feedback.para3": "Además, puede proporcionar comentarios en la herramienta mediante este enlace.", "contact.page.census.tract.feedback.title": "Comentarios sobre los grupos de bloques del censo", "contact.page.fab.survey.text": "Ayude a mejorar el sitio web y los datos", + "contact.page.fab.survey.link": "https://www.surveymonkey.com/r/cejst-survey-es", "contact.page.header.text": "Contacto", "contact.page.request.for.info.box.body": "Durante el periodo beta, se pueden enviar comentarios sobre la Herramienta para la evaluación de la justicia climática y económica mediante la Solicitud de información del CEQ que se encuentra disponible en federalregister.gov.", "contact.page.request.for.info.box.title": "Solicitud de información", @@ -364,4 +365,4 @@ "public.eng.page.whejac.meeting.day.2.info": "31 de marzo (3:00 - 7:00 PM EST)", "technical.support.doc.page.coming.soon.text": "¡Próximamente!", "technical.support.doc.page.title.text": "Documento de apoyo técnico" -} \ No newline at end of file +} diff --git a/client/src/pages/tests/__snapshots__/about.test.tsx.snap b/client/src/pages/tests/__snapshots__/about.test.tsx.snap index 514c2fa5..296b42b9 100644 --- a/client/src/pages/tests/__snapshots__/about.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/about.test.tsx.snap @@ -1040,17 +1040,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap index 9239c429..f30140de 100644 --- a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap @@ -454,7 +454,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Request for Infomation + Request for Information

- + +
diff --git a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap index 30ef44b7..eaa23511 100644 --- a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap @@ -610,17 +610,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap index fc201c1d..c14f91c3 100644 --- a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap @@ -572,17 +572,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap index a9df1aa2..8cfff93b 100644 --- a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap @@ -2647,17 +2647,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap index 6ee6a7dc..14676ae3 100644 --- a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap @@ -1040,17 +1040,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + + diff --git a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap index 86a8159b..3c54e039 100644 --- a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap @@ -572,17 +572,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="grid-container-desktop-lg" data-testid="gridContainer" > - + +