aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js4
-rw-r--r--server/sonar-web/src/main/js/app/components/help/__tests__/GlobalHelp-test.js13
2 files changed, 17 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js b/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js
index 9fdf2751253..ac2a737796e 100644
--- a/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js
+++ b/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js
@@ -49,6 +49,10 @@ export default function LinksHelpSonarCloud({ onClose }: Props) {
<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>
diff --git a/server/sonar-web/src/main/js/app/components/help/__tests__/GlobalHelp-test.js b/server/sonar-web/src/main/js/app/components/help/__tests__/GlobalHelp-test.js
index 96bbd9a27fe..76f95d4accb 100644
--- a/server/sonar-web/src/main/js/app/components/help/__tests__/GlobalHelp-test.js
+++ b/server/sonar-web/src/main/js/app/components/help/__tests__/GlobalHelp-test.js
@@ -52,6 +52,19 @@ it('does not show tutorials for anonymous', () => {
).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 } } });
}