diff --git a/src/progressive-profiling/ProgressiveProfiling.jsx b/src/progressive-profiling/ProgressiveProfiling.jsx index f8381d48..093d2803 100644 --- a/src/progressive-profiling/ProgressiveProfiling.jsx +++ b/src/progressive-profiling/ProgressiveProfiling.jsx @@ -180,18 +180,20 @@ const ProgressiveProfiling = (props) => { ) : null}
{formFields} - - (sendTrackEvent('edx.bi.welcome.page.support.link.clicked'))} - > - {intl.formatMessage(messages['optional.fields.information.link'])} - - + {(getConfig().AUTHN_PROGRESSIVE_PROFILING_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({ + AUTHN_PROGRESSIVE_PROFILING_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({ + AUTHN_PROGRESSIVE_PROFILING_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();