From 36935a2ab83bcb2c5aa391386a8872cba00cc400 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Gr=C3=A9goire=20Aubert?=
Date: Tue, 11 Jul 2017 10:41:12 +0200
Subject: [PATCH] Add Web API link back to SonarCloud help popup
---
.../js/app/components/help/LinksHelpSonarCloud.js | 4 ++++
.../components/help/__tests__/GlobalHelp-test.js | 13 +++++++++++++
2 files changed, 17 insertions(+)
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) {
{translate('footer.help')}
+
+ {translate('footer.web_api')}
+
+
{translate('footer.about')}
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(
+
+ );
+ clickOnSection(wrapper, 'links');
+ expect(wrapper.find('LinksHelpSonarCloud')).toHaveLength(1);
+});
+
function clickOnSection(wrapper: Object, section: string) {
click(wrapper.find(`[data-section="${section}"]`), { currentTarget: { dataset: { section } } });
}
--
2.39.5