Fixed the test cases,added sonar config

Fixed test cases and added sonar config details

Issue-ID: PORTAL-837
Change-Id: Ie4aa104871cfbbd6c6e36500f5ef2e250bafb575
Signed-off-by: jz385p <jegadeesh.babu@att.com>
diff --git a/portal-FE-os/pom.xml b/portal-FE-os/pom.xml
index 626addb..21bdd50 100644
--- a/portal-FE-os/pom.xml
+++ b/portal-FE-os/pom.xml
@@ -10,6 +10,14 @@
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<skipnode>false</skipnode>
 		<skipcopy>false</skipcopy>
+		<sonar.typescript.lcov.reportPaths>coverage/lcov.info</sonar.typescript.lcov.reportPaths>
+        <sonar.sources>src</sonar.sources>
+		<sonar.projectKey>portal-FE-os</sonar.projectKey>
+		<sonar.projectName>portal-FE-os</sonar.projectName> 
+		<sonar.exclusions>**/node_modules/**,**/*.spec.ts,**/*.module.ts,**/environment.prod.ts,**/*.js,**/main.ts,**/header-interceptor.ts,**/dynamic-widget.component.ts</sonar.exclusions>
+		<sonar.test.inclusions>**/*.spec.ts</sonar.test.inclusions>
+		<sonar.tests>src</sonar.tests>
+		<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
 	</properties>
 
 	<build>
@@ -97,6 +105,19 @@
 							<arguments>install</arguments>
 						</configuration>
 					</execution>
+					
+					<execution>
+						<id>npm run test</id>
+						<goals>
+							<goal>npm</goal>
+						</goals>
+
+						<phase>generate-resources</phase>
+
+						<configuration>
+							<arguments>run-script test</arguments>
+						</configuration>
+					</execution>
 
 					<execution>
 						<id>npm build</id>