diff --git a/src/welcome/ProgressiveProfiling.jsx b/src/welcome/ProgressiveProfiling.jsx index 16aa8247..e307980c 100644 --- a/src/welcome/ProgressiveProfiling.jsx +++ b/src/welcome/ProgressiveProfiling.jsx @@ -148,18 +148,20 @@ const ProgressiveProfiling = (props) => { ) : null}
{formFields} - - (sendTrackEvent('edx.bi.welcome.page.support.link.clicked'))} - > - {intl.formatMessage(messages['optional.fields.information.link'])} - - + {(getConfig().WELCOME_PAGE_SUPPORT_LINK) && ( + + (sendTrackEvent('edx.bi.welcome.page.support.link.clicked'))} + > + {intl.formatMessage(messages['optional.fields.information.link'])} + + + )}
{ }; }); + it('not should display button "Learn more about how we use this information."', async () => { + mergeConfig({ + WELCOME_PAGE_SUPPORT_LINK: '', + }); + const progressiveProfilingPage = await getProgressiveProfilingPage(); + + expect(progressiveProfilingPage.find('a.pgn__hyperlink').exists()).toBeFalsy(); + }); + + it('should display button "Learn more about how we use this information."', async () => { + mergeConfig({ + WELCOME_PAGE_SUPPORT_LINK: 'http://localhost:1999/support', + }); + const progressiveProfilingPage = await getProgressiveProfilingPage(); + + expect(progressiveProfilingPage.find('a.pgn__hyperlink').text()).toEqual('Learn more about how we use this information.'); + }); + it('should render fields returned by backend api', async () => { const progressiveProfilingPage = await getProgressiveProfilingPage(); expect(progressiveProfilingPage.find('#gender').exists()).toBeTruthy();