Jest JS Coverage 74/111674/5
authorwaynedunican <wayne.dunican@est.tech>
Mon, 24 Aug 2020 12:36:15 +0000 (13:36 +0100)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 25 Aug 2020 13:35:52 +0000 (09:35 -0400)
Edited SonarCloud lcov reports path. Removed from pdp-monitoring
pom.xml. Added node binary source executable path and sources sonar
properties to pom.xml.

Issue-ID: POLICY-2610
Change-Id: I6354e65d358ca5e9bd8c18f032330aa5063a0889
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
gui-editors/pom.xml
gui-pdp-monitoring/pom.xml
gui-pdp-monitoring/src/webapp/package.json
pom.xml

index 9ef52cc..e772a04 100644 (file)
     <name>${project.artifactId}</name>
     <description>Web Client editors for PDP policies</description>
 
+    <properties>
+        <sonar.sources>${project.basedir}/src/main</sonar.sources>
+        <sonar.exclusions>src/main/resources/webapp/js/edit_area/**/*,src/main/resources/webapp/js/jquery/**/*,src/main/resources/webapp/js/jquery-ui-1.12.1/**/*,src/main/resources/webapp/js/lib/**/*</sonar.exclusions>
+    </properties>
+
     <modules>
         <module>gui-editor-apex</module>
     </modules>
index 0f8743c..17b008f 100644 (file)
@@ -32,7 +32,9 @@
 
     <properties>
         <webapp.dir>src/webapp</webapp.dir>
-        <sonar.javascript.lcov.reportPaths>src/webapp/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
+        <sonar.nodejs.executable>${project.basedir}/src/webapp/node/node</sonar.nodejs.executable>
+        <sonar.sources>${project.basedir}/src/main,${project.basedir}/src/webapp/js</sonar.sources>
+        <sonar.exclusions>src/webapp/js/__test__/**</sonar.exclusions>
     </properties>
 
     <dependencies>
                         <goals>
                             <goal>npm</goal>
                         </goals>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
                     </execution>
                     <execution>
                         <id>npm test</id>
                         <goals>
                             <goal>npm</goal>
                         </goals>
+                        <phase>test</phase>
                         <configuration>
                             <arguments>test</arguments>
                         </configuration>
index 793d6ba..88389ca 100644 (file)
     },
     "jest": {
         "collectCoverage": true,
-        "coverageDirectory": "../../../target/code-coverage",
+        "coverageDirectory": "../../target/code-coverage",
         "transform": {
             "^.+\\.[t|j]sx?$": "babel-jest"
         },
         "testResultsProcessor": "jest-sonar-reporter"
     },
     "jestSonar": {
-        "reportPath": "../../../target/reports",
+        "reportPath": "../../target/reports",
         "reportFile": "test-reporter.xml",
         "indent": 4,
         "sonar56x": true
diff --git a/pom.xml b/pom.xml
index 1f2ce46..81e8336 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,8 @@
     <properties>
         <policy.common.version>1.7.1-SNAPSHOT</policy.common.version>
         <policy.models.version>2.3.1-SNAPSHOT</policy.models.version>
-        <sonar.javascript.lcov.reportPaths>target/code-coverage/lcov.info</sonar.javascript.lcov.reportPaths>
+        <jacoco.dataFile>${project.basedir}/../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
+        <sonar.javascript.lcov.reportPaths>${project.basedir}/target/code-coverage/lcov.info</sonar.javascript.lcov.reportPaths>
     </properties>
 
     <modules>