summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-03-11 20:29:15 +0530
committerRupinderjeet Singh <rupinsi1@in.ibm.com>2020-03-12 09:00:13 +0000
commit5faf4d3c3c28456e7db129fe8cfbbbf69b1ac9c2 (patch)
tree956c4eb86c9f19e91a66837772bd5905277fb7f6 /ecomp-sdk
parent1dc25cca722492de0d28487ddf24936e2bf875a5 (diff)
made change in pom.xml and other files
Made changes in pom.xml to enable the sonar coverage Issue-ID: PORTAL-834 Change-Id: I61590ab93ad67883ac2a4fca3f50b27e387f8c71 Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-app-os/ngapp/package.json15
-rw-r--r--ecomp-sdk/epsdk-app-os/ngapp/src/karma.conf.js3
-rw-r--r--ecomp-sdk/epsdk-app-os/pom.xml13
3 files changed, 24 insertions, 7 deletions
diff --git a/ecomp-sdk/epsdk-app-os/ngapp/package.json b/ecomp-sdk/epsdk-app-os/ngapp/package.json
index 5ff29579..95879586 100644
--- a/ecomp-sdk/epsdk-app-os/ngapp/package.json
+++ b/ecomp-sdk/epsdk-app-os/ngapp/package.json
@@ -5,9 +5,10 @@
"ng": "ng",
"start": "ng serve --host www.sdk.onap.org --port 8200 --open",
"build": "ng build",
- "test": "ng test",
+ "test": "ng test --watch=false --code-coverage --browsers=ChromeHeadless",
"lint": "ng lint",
- "e2e": "ng e2e"
+ "e2e": "ng e2e",
+ "sonar": "sonar-scanner"
},
"private": true,
"dependencies": {
@@ -34,15 +35,16 @@
"d3-scale": "^3.1.0",
"font-awesome": "^4.7.0",
"ionicons": "^4.6.2",
+ "lodash-es": "^4.17.10",
"ng2-smart-table": "^1.5.0",
"ng6-o2-chart": "^0.4.0",
+ "ngx-cookie-service": "^2.3.0",
+ "portalsdk-tag-lib": "file:portalsdk-tag-lib-0.0.1.tgz",
"rxjs": "~6.3.3",
"rxjs-compat": "^6.5.2",
+ "sonar-scanner": "^3.1.0",
"tslib": "^1.9.0",
- "zone.js": "~0.8.26",
- "lodash-es": "^4.17.10",
- "ngx-cookie-service": "^2.3.0",
- "portalsdk-tag-lib": "file:portalsdk-tag-lib-0.0.1.tgz"
+ "zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.10.0",
@@ -61,6 +63,7 @@
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
+ "puppeteer": "^2.1.1",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
diff --git a/ecomp-sdk/epsdk-app-os/ngapp/src/karma.conf.js b/ecomp-sdk/epsdk-app-os/ngapp/src/karma.conf.js
index 3006a5b7..a3c65a50 100644
--- a/ecomp-sdk/epsdk-app-os/ngapp/src/karma.conf.js
+++ b/ecomp-sdk/epsdk-app-os/ngapp/src/karma.conf.js
@@ -1,6 +1,7 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
+process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function (config) {
const defaults = {
basePath: '',
@@ -28,7 +29,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
- browsers: ['Chrome'],
+ browsers: ['ChromeHeadless'],
singleRun: false,
}
diff --git a/ecomp-sdk/epsdk-app-os/pom.xml b/ecomp-sdk/epsdk-app-os/pom.xml
index 7287fe1a..add3c1a0 100644
--- a/ecomp-sdk/epsdk-app-os/pom.xml
+++ b/ecomp-sdk/epsdk-app-os/pom.xml
@@ -30,6 +30,16 @@
<!-- Version number gets stored only here -->
<tomcat.download.path>http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin</tomcat.download.path>
<tomcat.download.name>apache-tomcat-8.0.37</tomcat.download.name>
+
+ <sonar.typescript.lcov.reportPaths>ngapp/coverage/lcov.info</sonar.typescript.lcov.reportPaths>
+ <sonar.sources>ngapp/src</sonar.sources>
+ <sonar.projectKey>portal-sdk</sonar.projectKey>
+ <sonar.projectName>portal-sdk</sonar.projectName>
+ <sonar.exclusions>**/node_modules/**,**/*.spec.ts</sonar.exclusions>
+ <sonar.test.inclusions>**/*.spec.ts</sonar.test.inclusions>
+ <sonar.tests>ngapp/src</sonar.tests>
+ <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
+
</properties>
<!-- repositories are inherited from parent -->
@@ -130,6 +140,7 @@
<outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
</configuration>
</execution>
+
</executions>
</plugin>
@@ -160,7 +171,9 @@
</goals>
</execution>
+
<execution>
+
<id>npm run build</id>
<phase>compile</phase>
<goals>