From 949f20dabb7f4799cf6dbc85a8da7eae25a93eaf Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Tue, 7 Jan 2020 18:23:58 +0100 Subject: [PATCH] SONAR-12726 Hide security hotspots for portfolios --- .../nav/component/ComponentNavMenu.tsx | 16 +++++---- .../ComponentNavMenu-test.tsx.snap | 34 ------------------- 2 files changed, 9 insertions(+), 41 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx index 71258e7c207..72030ec00cd 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx @@ -153,13 +153,15 @@ export class ComponentNavMenu extends React.PureComponent { renderSecurityHotspotsLink() { return ( -
  • - - {translate('layout.security_hotspots')} - -
  • + !this.isPortfolio() && ( +
  • + + {translate('layout.security_hotspots')} + +
  • + ) ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.tsx.snap index 1b30f2e863c..a9d856cf7c7 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.tsx.snap @@ -509,23 +509,6 @@ exports[`should work for all qualifiers 2`] = ` issues.page -
  • - - layout.security_hotspots - -
  • -
  • - - layout.security_hotspots - -