From fa2da3f08329ff6498ecc09b4630a259514e65bc Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Fri, 17 May 2019 16:55:56 +0200 Subject: [PATCH] SONAR-12110 Fix extra lines/snippets issue --- .../ComponentSourceSnippetViewer.tsx | 11 +- ...ComponentSourceViewerWrapper-test.tsx.snap | 284 ++++++++++-------- 2 files changed, 154 insertions(+), 141 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx index 0a044115980..72f972d71d9 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx @@ -94,17 +94,8 @@ export default class ComponentSourceSnippetViewer extends React.PureComponent - + import java.util.ArrayList;", - "coverageStatus": "covered", - "coveredConditions": 2, - "duplicated": false, - "isNew": true, - "line": 16, - "scmAuthor": "simon.brandhof@sonarsource.com", - "scmDate": "2018-12-11T10:48:39+0100", - "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0", + "locations": Array [ + Object { + "component": "main.js", + "index": 0, + "textRange": Object { + "endLine": 2, + "endOffset": 2, + "startLine": 1, + "startOffset": 1, + }, + }, + ], + "sources": Object { + "16": Object { + "code": "import java.util.ArrayList;", + "coverageStatus": "covered", + "coveredConditions": 2, + "duplicated": false, + "isNew": true, + "line": 16, + "scmAuthor": "simon.brandhof@sonarsource.com", + "scmDate": "2018-12-11T10:48:39+0100", + "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0", + }, }, - }, + } } - } - /> + /> + `; -- 2.39.5