diff --git a/karma.conf.js b/karma.conf.js index 8a289e2..cac700d 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -3,7 +3,7 @@ module.exports = function (config) { config.set({ - basePath: '', + basePath: '.', logLevel: config.LOG_INFO, frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ @@ -45,8 +45,8 @@ module.exports = function (config) { coverageReporter: { includeAllSources: true, dir: 'reports', - subdir: 'coverage', - reporters: [{ type: 'html' }, { type: 'text-summary' }] + subdir: 'coverage', // common name instaed browser-specific + reporters: [{ type: 'text-summary' }, { type: 'lcov' }] }, reporters: ['progress', 'kjhtml', 'coverage', 'sonarqubeUnit'], preprocessors: { 'src/**/*.js': ['coverage'] }, diff --git a/package.json b/package.json index c8b077d..9581d4f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "OneCX Development Team " ], "config": { - "openapiYaml": "src/assets/api/onecx-product-store-bff.yaml", + "openapiYaml": "src/assets/api/product-store-bff-api.yaml", "openapiOutput": "src/app/generated" }, "scripts": { @@ -34,19 +34,6 @@ "pre-commit": "pretty-quick --staged" } }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "codeCoverage": true, - "codeCoverageExclude": [ - "src/app/generated/**/*" - ] - } - }, "dependencies": { "@angular-architects/module-federation": "15.0.0", "@angular/animations": "15.2.7", @@ -67,17 +54,12 @@ "@onecx/keycloak-auth": "^3.7.1", "@onecx/portal-integration-angular": "^3.7.1", "@onecx/portal-layout-styles": "^3.7.1", - "clsx": "^1.2.1", - "core-js": "^3.35.0", "file-saver": "^2.0.5", "i18n-iso-countries": "^7.6.0", - "keycloak-angular": "^13.0.0", - "keycloak-js": "^18.0.0", "ngx-color": "^8.0.3", - "primeflex": "^3.3.0", + "primeflex": "^3.3.1", "primeicons": "^6.0.1", - "primeng": "^15.3.0", - "regenerator-runtime": "0.13.11", + "primeng": "15.2.1", "rxjs": "7.8.1", "tslib": "^2.5.0", "zod": "^3.22.1", @@ -106,7 +88,7 @@ "@storybook/core-server": "7.0.4 ", "@svgr/webpack": "^7.0.0", "@swc-node/register": "^1.6.5", - "@swc/cli": "~0.1.62", + "@swc/cli": "~0.1.63", "@swc/core": "^1.3.56", "@swc/helpers": "0.5.1", "@types/jasmine": "~3.10.0", @@ -141,7 +123,7 @@ "ngx-translate-testing": "^6.1.0", "postcss": "8.4.23", "postcss-import": "~15.1.0", - "postcss-preset-env": "~8.3.2", + "postcss-preset-env": "~9.3.0", "postcss-url": "~10.1.3", "prettier": "^2.8.8", "sonarqube-scanner": "^3.3.0", diff --git a/sonar-local-project.properties b/sonar-local-project.properties new file mode 100644 index 0000000..5f4e98b --- /dev/null +++ b/sonar-local-project.properties @@ -0,0 +1,25 @@ +# sonar.verbose=true +# run locally: +# docker run -p 9000:9000 sonarqube:lts +# user/pwd: admin/admin +# generate project token! +# start: +# npm run sonar +# +sonar.host.url=http://localhost:9000 +sonar.login= +# +sonar.organization=onecx +sonar.projectKey=onecx-product-store-ui +sonar.projectName=onecx-product-store-ui +sonar.javascript.coveragePlugin=lcov +sonar.javascript.lcov.reportPaths=reports/coverage/lcov.info +sonar.testExecutionReportPaths=reports/sonarqube_report.xml +sonar.sourceEncoding=UTF-8 +#sonar.sources=src/app +#sonar.working.directory=dist/sonar +sonar.coverage.exclusions=*.ts,*.js,src/*.ts,src/**/*.module.ts,src/environments/*,src/assets/**/*,src/app/generated/**/*,src/test/* +#sonar.exclusions=src/app/generated/**/* +#sonar.cpd.exclusions= +#sonar.tests=src/app +sonar.test.inclusions=src/app/**/*.spec.ts \ No newline at end of file