exports[`should render correctly 2`] = `
<div>
- <ComponentSourceSnippetViewer
- issue={
+ <ContextProvider
+ key="1-0-0"
+ value={
Object {
- "actions": Array [],
- "component": "main.js",
- "componentLongName": "main.js",
- "componentQualifier": "FIL",
- "componentUuid": "foo1234",
- "creationDate": "2017-03-01T09:36:01+0100",
- "flows": Array [
- Array [
- Object {
- "component": "main.js",
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
+ "branchLike": undefined,
+ "file": Object {
+ "key": "main.js",
+ "measures": Object {
+ "coverage": "85.2",
+ "duplicationDensity": "1.0",
+ "issues": "12",
+ "lines": "56",
+ },
+ "path": "main.js",
+ "project": "my-project",
+ "projectName": "MyProject",
+ "q": "FIL",
+ "uuid": "foo-bar",
+ },
+ }
+ }
+ >
+ <ComponentSourceSnippetViewer
+ issue={
+ Object {
+ "actions": Array [],
+ "component": "main.js",
+ "componentLongName": "main.js",
+ "componentQualifier": "FIL",
+ "componentUuid": "foo1234",
+ "creationDate": "2017-03-01T09:36:01+0100",
+ "flows": Array [
+ Array [
+ Object {
+ "component": "main.js",
+ "textRange": Object {
+ "endLine": 2,
+ "endOffset": 2,
+ "startLine": 1,
+ "startOffset": 1,
+ },
},
- },
- Object {
- "component": "main.js",
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
+ Object {
+ "component": "main.js",
+ "textRange": Object {
+ "endLine": 2,
+ "endOffset": 2,
+ "startLine": 1,
+ "startOffset": 1,
+ },
},
- },
- Object {
- "component": "main.js",
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
+ Object {
+ "component": "main.js",
+ "textRange": Object {
+ "endLine": 2,
+ "endOffset": 2,
+ "startLine": 1,
+ "startOffset": 1,
+ },
},
- },
+ ],
+ Array [
+ Object {
+ "component": "main.js",
+ "textRange": Object {
+ "endLine": 2,
+ "endOffset": 2,
+ "startLine": 1,
+ "startOffset": 1,
+ },
+ },
+ Object {
+ "component": "main.js",
+ "textRange": Object {
+ "endLine": 2,
+ "endOffset": 2,
+ "startLine": 1,
+ "startOffset": 1,
+ },
+ },
+ ],
],
- Array [
+ "fromHotspot": false,
+ "key": "1",
+ "line": 25,
+ "message": "Reduce the number of conditional operators (4) used in the expression",
+ "organization": "myorg",
+ "project": "myproject",
+ "projectKey": "foo",
+ "projectName": "Foo",
+ "projectOrganization": "org",
+ "rule": "javascript:S1067",
+ "ruleName": "foo",
+ "secondaryLocations": Array [
Object {
"component": "main.js",
"textRange": Object {
},
},
],
- ],
- "fromHotspot": false,
- "key": "1",
- "line": 25,
- "message": "Reduce the number of conditional operators (4) used in the expression",
- "organization": "myorg",
- "project": "myproject",
- "projectKey": "foo",
- "projectName": "Foo",
- "projectOrganization": "org",
- "rule": "javascript:S1067",
- "ruleName": "foo",
- "secondaryLocations": Array [
- Object {
- "component": "main.js",
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
- },
+ "severity": "MAJOR",
+ "status": "OPEN",
+ "textRange": Object {
+ "endLine": 26,
+ "endOffset": 15,
+ "startLine": 25,
+ "startOffset": 0,
},
+ "transitions": Array [],
+ "type": "BUG",
+ }
+ }
+ issuesByLine={Object {}}
+ last={true}
+ loadDuplications={[Function]}
+ locations={
+ Array [
Object {
"component": "main.js",
+ "index": 0,
"textRange": Object {
"endLine": 2,
"endOffset": 2,
"startOffset": 1,
},
},
- ],
- "severity": "MAJOR",
- "status": "OPEN",
- "textRange": Object {
- "endLine": 26,
- "endOffset": 15,
- "startLine": 25,
- "startOffset": 0,
- },
- "transitions": Array [],
- "type": "BUG",
+ ]
}
- }
- issuesByLine={Object {}}
- key="1-0-0"
- last={true}
- loadDuplications={[Function]}
- locations={
- Array [
+ onIssueChange={[MockFunction]}
+ onIssuePopupToggle={[Function]}
+ onLinePopupToggle={[Function]}
+ onLocationSelect={[MockFunction]}
+ renderDuplicationPopup={[Function]}
+ scroll={[MockFunction]}
+ snippetGroup={
Object {
- "component": "main.js",
- "index": 0,
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
- },
- },
- ]
- }
- onIssueChange={[MockFunction]}
- onIssuePopupToggle={[Function]}
- onLinePopupToggle={[Function]}
- onLocationSelect={[MockFunction]}
- renderDuplicationPopup={[Function]}
- scroll={[MockFunction]}
- snippetGroup={
- Object {
- "component": Object {
- "key": "main.js",
- "measures": Object {
- "coverage": "85.2",
- "duplicationDensity": "1.0",
- "issues": "12",
- "lines": "56",
- },
- "path": "main.js",
- "project": "my-project",
- "projectName": "MyProject",
- "q": "FIL",
- "uuid": "foo-bar",
- },
- "locations": Array [
- Object {
- "component": "main.js",
- "index": 0,
- "textRange": Object {
- "endLine": 2,
- "endOffset": 2,
- "startLine": 1,
- "startOffset": 1,
+ "component": Object {
+ "key": "main.js",
+ "measures": Object {
+ "coverage": "85.2",
+ "duplicationDensity": "1.0",
+ "issues": "12",
+ "lines": "56",
},
+ "path": "main.js",
+ "project": "my-project",
+ "projectName": "MyProject",
+ "q": "FIL",
+ "uuid": "foo-bar",
},
- ],
- "sources": Object {
- "16": Object {
- "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
- "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": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
+ "coverageStatus": "covered",
+ "coveredConditions": 2,
+ "duplicated": false,
+ "isNew": true,
+ "line": 16,
+ "scmAuthor": "simon.brandhof@sonarsource.com",
+ "scmDate": "2018-12-11T10:48:39+0100",
+ "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
+ },
},
- },
+ }
}
- }
- />
+ />
+ </ContextProvider>
</div>
`;