aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx7
-rw-r--r--server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx18
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties1
3 files changed, 19 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx
index ccf35a87fae..06ff467e965 100644
--- a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx
+++ b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx
@@ -129,6 +129,13 @@ export default class EmbedDocsPopup extends React.PureComponent<Props> {
</li>
<li>
{this.renderIconLink(
+ 'https://www.sonarqube.org/roadmap/?referrer=sonarqube',
+ 'embed-doc/sq-icon.svg',
+ translate('docs.roadmap')
+ )}
+ </li>
+ <li>
+ {this.renderIconLink(
'https://twitter.com/SonarQube',
'embed-doc/twitter-icon.svg',
'Twitter'
diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx b/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx
index d404fdfdcec..78f29fd979f 100644
--- a/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx
+++ b/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx
@@ -27,20 +27,24 @@ import { SuggestionsContext } from '../SuggestionsContext';
it('should render with no suggestions', () => {
renderEmbedDocsPopup();
- expect(screen.getAllByRole('link')).toHaveLength(5);
+ expect(screen.queryByText(suggestions[0].text)).not.toBeInTheDocument();
expect(screen.getByText('docs.documentation')).toHaveFocus();
});
it('should render with suggestions', () => {
- renderEmbedDocsPopup([
- { link: '/docs/awesome-doc', text: 'mindblowing' },
- { link: '/docs/whocares', text: 'boring' },
- ]);
+ renderEmbedDocsPopup(suggestions);
- expect(screen.getAllByRole('link')).toHaveLength(7);
- expect(screen.getByText('mindblowing')).toHaveFocus();
+ suggestions.forEach((suggestion) => {
+ expect(screen.getByText(suggestion.text)).toBeInTheDocument();
+ });
+ expect(screen.getByText(suggestions[0].text)).toHaveFocus();
});
+const suggestions = [
+ { link: '/docs/awesome-doc', text: 'mindblowing' },
+ { link: '/docs/whocares', text: 'boring' },
+];
+
function renderEmbedDocsPopup(suggestions: SuggestionLink[] = []) {
return renderComponent(
<SuggestionsContext.Provider
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index 8344b7b3db2..0d88ecb9521 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -3440,6 +3440,7 @@ component_measures.not_all_measures_are_shown.help=You do not have access to all
#------------------------------------------------------------------------------
docs.documentation=Documentation
docs.get_help=Get Help
+docs.roadmap=Product Roadmap
docs.news=Product News
docs.stay_connected=Stay Connected
docs.suggestion=Suggestions For This Page