<a href="https://about.sonarcloud.io/contact/">{translate('footer.help')}</a>
</p>
+ <p className="spacer-bottom">
+ <Link to="/web_api" onClick={onClose}>{translate('footer.web_api')}</Link>
+ </p>
+
<p>
<Link to="/about" onClick={onClose}>{translate('footer.about')}</Link>
</p>
).toMatchSnapshot();
});
+it('display special links page for SonarCloud', () => {
+ const wrapper = shallow(
+ <GlobalHelp
+ currentUser={{ isLoggedIn: false }}
+ onClose={jest.fn()}
+ onTutorialSelect={jest.fn()}
+ sonarCloud={true}
+ />
+ );
+ clickOnSection(wrapper, 'links');
+ expect(wrapper.find('LinksHelpSonarCloud')).toHaveLength(1);
+});
+
function clickOnSection(wrapper: Object, section: string) {
click(wrapper.find(`[data-section="${section}"]`), { currentTarget: { dataset: { section } } });
}