From 36a2571ece01e51f104523ed98f43e6f27f03f75 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 21 Jun 2019 15:44:00 +0200 Subject: [PATCH] SONAR-12092 Fix broken empty portfolio display --- .../main/js/apps/portfolio/components/App.tsx | 20 +++++++++------- .../__tests__/__snapshots__/App-test.tsx.snap | 24 ++++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx index 433a00de531..a24788c0bda 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx @@ -118,20 +118,24 @@ export class App extends React.PureComponent { renderEmpty() { return ( -
-

- {!this.state.measures || !this.state.measures['projects'] - ? translate('portfolio.empty') - : translate('portfolio.no_lines_of_code')} -

+
+
+

+ {!this.state.measures || !this.state.measures['projects'] + ? translate('portfolio.empty') + : translate('portfolio.no_lines_of_code')} +

+
); } renderWhenNotComputed() { return ( -
-

{translate('portfolio.not_computed')}

+
+
+

{translate('portfolio.not_computed')}

+
); } diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap index 4691a613e06..898a5bf3a71 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap @@ -148,20 +148,28 @@ exports[`renders 1`] = ` exports[`renders when portfolio is empty 1`] = `
-

- portfolio.empty -

+
+

+ portfolio.empty +

+
`; exports[`renders when portfolio is not computed 1`] = `
-

- portfolio.not_computed -

+
+

+ portfolio.not_computed +

+
`; -- 2.39.5