mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-2788] Fix the process service coverage path and config (#4009)
* Fix the process service coverage path and config * Create a index report page and run the liteserver
This commit is contained in:
committed by
Denys Vuika
parent
c954b2f815
commit
073311185f
@@ -617,7 +617,7 @@
|
|||||||
},
|
},
|
||||||
"process-services": {
|
"process-services": {
|
||||||
"root": "lib/process-services",
|
"root": "lib/process-services",
|
||||||
"sourceRoot": "lib/process-services/src",
|
"sourceRoot": "lib/process-services",
|
||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"prefix": "adf",
|
"prefix": "adf",
|
||||||
"architect": {
|
"architect": {
|
||||||
|
18
lib/config/create-coverage-index.sh
Executable file
18
lib/config/create-coverage-index.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ROOT=./lib/coverage
|
||||||
|
HTTP="/"
|
||||||
|
OUTPUT="./lib/coverage/index.html"
|
||||||
|
RULE=".*\.\(html\)"
|
||||||
|
|
||||||
|
echo "<h1>Coverage ADF Reports</h1>" > $OUTPUT
|
||||||
|
echo "<ul>" >> $OUTPUT
|
||||||
|
i=0
|
||||||
|
for filepath in `find "$ROOT" -maxdepth 1 -mindepth 1 -type d| sort`; do
|
||||||
|
path=`basename "$filepath"`
|
||||||
|
for i in `find "$filepath" -regex "$RULE" -maxdepth 1 -mindepth 1 -type f| sort`; do
|
||||||
|
file=`basename "$i"`
|
||||||
|
echo " <li><a href=\"/$path/$file\">$path</a></li>" >> $OUTPUT
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo "</ul>" >> $OUTPUT
|
6
lib/config/proxy-coverage.json
Normal file
6
lib/config/proxy-coverage.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"port": 4344,
|
||||||
|
"server": {
|
||||||
|
"baseDir": "./lib/coverage/"
|
||||||
|
}
|
||||||
|
}
|
@@ -3,55 +3,50 @@
|
|||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '../../',
|
basePath: '',
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
|
{ pattern: '../../node_modules/core-js/client/core.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/tslib/tslib.js', included: true, watched: false},
|
{ pattern: '../../node_modules/tslib/tslib.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/hammerjs/hammer.min.js', included: true, watched: false},
|
{ pattern: '../../node_modules/hammerjs/hammer.min.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/hammerjs/hammer.min.js.map', included: false, watched: false},
|
{ pattern: '../../node_modules/hammerjs/hammer.min.js.map', included: false, watched: false },
|
||||||
|
|
||||||
// pdf-js
|
// pdf-js
|
||||||
{pattern: 'node_modules/pdfjs-dist/build/pdf.js', included: true, watched: false},
|
{ pattern: '../../node_modules/pdfjs-dist/build/pdf.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/pdfjs-dist/build/pdf.worker.js', included: true, watched: false},
|
{ pattern: '../../node_modules/pdfjs-dist/build/pdf.worker.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/pdfjs-dist/web/pdf_viewer.js', included: true, watched: false},
|
{ pattern: '../../node_modules/pdfjs-dist/web/pdf_viewer.js', included: true, watched: false },
|
||||||
|
|
||||||
{
|
{
|
||||||
pattern: 'node_modules/@angular/material/prebuilt-themes/indigo-pink.css',
|
pattern: '../../node_modules/@angular/material/prebuilt-themes/indigo-pink.css',
|
||||||
included: true,
|
included: true,
|
||||||
watched: false
|
watched: false
|
||||||
},
|
},
|
||||||
|
|
||||||
{pattern: 'node_modules/chart.js/dist/Chart.js', included: true, watched: false},
|
{ pattern: '../../node_modules/chart.js/dist/Chart.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/raphael/raphael.min.js', included: true, watched: false},
|
{ pattern: '../../node_modules/raphael/raphael.min.js', included: true, watched: false },
|
||||||
{
|
{
|
||||||
pattern: 'node_modules/ng2-charts/bundles/ng2-charts.umd.js',
|
pattern: '../../node_modules/ng2-charts/bundles/ng2-charts.umd.js',
|
||||||
included: false,
|
included: false,
|
||||||
served: true,
|
served: true,
|
||||||
watched: false
|
watched: false
|
||||||
},
|
},
|
||||||
|
|
||||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.min.js', included: true, watched: false},
|
{ pattern: '../../node_modules/alfresco-js-api/dist/alfresco-js-api.min.js', included: true, watched: false },
|
||||||
{pattern: 'node_modules/moment/min/moment.min.js', included: true, watched: false},
|
{ pattern: '../../node_modules/moment/min/moment.min.js', included: true, watched: false },
|
||||||
|
|
||||||
{pattern: 'lib/core/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: '../core/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/content-services/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: '../content-services/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/process-services/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: '../process-services/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
|
{ pattern: '../process-services/**/*.ts', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/process-services/**/*.ts', included: false, served: true, watched: false},
|
{ pattern: '../config/app.config.json', included: false, served: true, watched: false }
|
||||||
{pattern: 'lib/config/app.config.json', included: false, served: true, watched: false}
|
|
||||||
],
|
],
|
||||||
|
|
||||||
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
|
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
|
||||||
|
|
||||||
proxies: {
|
proxies: {
|
||||||
'/base/assets/' :'/base/assets/',
|
'/base/assets/': '/base/assets/',
|
||||||
'/assets/adf-core/i18n/en.json': '/base/lib/core/i18n/en.json',
|
'/assets/adf-core/i18n/en.json': '/base/lib/core/i18n/en.json',
|
||||||
'/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/i18n/en.json',
|
'/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/i18n/en.json',
|
||||||
'/assets/adf-process-services/i18n/en.json': '/base/lib/process-services/i18n/en.json',
|
'/assets/adf-process-services/i18n/en.json': '/base/lib/process-services/i18n/en.json',
|
||||||
'/app.config.json': '/base/lib/config/app.config.json'
|
'/app.config.json': '/base/lib/config/app.config.json'
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine-ajax'),
|
require('karma-jasmine-ajax'),
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
@@ -65,18 +60,11 @@ module.exports = function (config) {
|
|||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
},
|
},
|
||||||
coverageIstanbulReporter: {
|
coverageIstanbulReporter: {
|
||||||
dir: './lib/coverage/process-services/',
|
dir: require('path').join(__dirname, '../coverage/process-services'),
|
||||||
reports: ['html', 'lcovonly'],
|
reports: ['html', 'lcovonly'],
|
||||||
fixWebpackSourcePaths: true
|
fixWebpackSourcePaths: true
|
||||||
},
|
},
|
||||||
|
|
||||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
|
|
||||||
colors: true,
|
|
||||||
|
|
||||||
autoWatch: false,
|
|
||||||
|
|
||||||
browserDisconnectTimeout: 200000,
|
browserDisconnectTimeout: 200000,
|
||||||
browserNoActivityTimeout: 2400000,
|
browserNoActivityTimeout: 2400000,
|
||||||
captureTimeout: 1200000,
|
captureTimeout: 1200000,
|
||||||
@@ -95,6 +83,9 @@ module.exports = function (config) {
|
|||||||
|
|
||||||
reporters: ['mocha', 'kjhtml'],
|
reporters: ['mocha', 'kjhtml'],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
browsers: ['Chrome'],
|
browsers: ['Chrome'],
|
||||||
singleRun: false
|
singleRun: false
|
||||||
});
|
});
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
"clean-lock": "rimraf package-lock.json",
|
"clean-lock": "rimraf package-lock.json",
|
||||||
"webpack": "node ./node_modules/webpack/bin/webpack.js",
|
"webpack": "node ./node_modules/webpack/bin/webpack.js",
|
||||||
"ng-packagr": "node ./node_modules/ng-packagr/cli/main.js",
|
"ng-packagr": "node ./node_modules/ng-packagr/cli/main.js",
|
||||||
|
"coverage": "./lib/config/create-coverage-index.sh && lite-server -c ./lib/config/proxy-coverage.json",
|
||||||
"lite-server-e2e": "lite-server --baseDir='demo-shell/dist/' -c ./e2e/lite-server-proxy.js",
|
"lite-server-e2e": "lite-server --baseDir='demo-shell/dist/' -c ./e2e/lite-server-proxy.js",
|
||||||
"spellcheck": "cspell 'demo-shell/{src,e2e}/**/*.ts' 'e2e/**/*.ts' 'lib/{content-services,core,extensions,insights,process-services}/**/*.ts'"
|
"spellcheck": "cspell 'demo-shell/{src,e2e}/**/*.ts' 'e2e/**/*.ts' 'lib/{content-services,core,extensions,insights,process-services}/**/*.ts'"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user