mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[MNT-24538] Update PDFjs viewer version and disable annotation mode (#10538)
* [MNT-24538] Bump PDFjs viewer version and use annotation mode disabled * [MNT-24538] Proper test params * [ci:force] * [MNT-24538] Use different pdfjs version * [ci:force] * [MNT-24538][ci:force] Use proper legacy paths * [MNT-24538][ci:force] Use Node 22 LTS * [MNT-24538] Use pdfjs legacy version * [MNT-24538] Use existing pdfjs-dist version with new param * [MNT-24538] Legacy build cleanup * [MNT-24538] Lockfile fix * [MNT-24538] Lockfile fix * [MNT-24538] Unit test fix * [MNT-24538] Unit test fixes
This commit is contained in:
parent
18ff34c6c8
commit
8b5dcf19b9
@ -1,5 +1,6 @@
|
|||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
/* eslint-env es6 */
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
const { constants } = require('karma');
|
const { constants } = require('karma');
|
||||||
|
|
||||||
@ -8,25 +9,25 @@ module.exports = function (config) {
|
|||||||
basePath: '../../',
|
basePath: '../../',
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
{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: 'lib/content-services/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: 'lib/content-services/src/lib/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
{
|
{
|
||||||
pattern: 'lib/content-services/src/lib/assets/images/**/*.svg',
|
pattern: 'lib/content-services/src/lib/assets/images/**/*.svg',
|
||||||
included: false,
|
included: false,
|
||||||
served: true,
|
served: true,
|
||||||
watched: false
|
watched: false
|
||||||
},
|
},
|
||||||
{pattern: 'lib/core/src/lib/assets/**/*.svg', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/assets/**/*.svg', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false},
|
{ pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/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'],
|
||||||
@ -38,7 +39,7 @@ module.exports = function (config) {
|
|||||||
'/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/src/lib/i18n/en.json',
|
'/assets/adf-content-services/i18n/en.json': '/base/lib/content-services/src/lib/i18n/en.json',
|
||||||
'/assets/adf-core/i18n/en.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/app.config.json': '/base/lib/config/app.config.json',
|
'/app.config.json': '/base/lib/config/app.config.json'
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -58,7 +59,7 @@ module.exports = function (config) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
jasmineHtmlReporter: {
|
jasmineHtmlReporter: {
|
||||||
suppressAll: true, // removes the duplicated traces
|
suppressAll: true // removes the duplicated traces
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
@ -78,12 +79,7 @@ module.exports = function (config) {
|
|||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
ChromeHeadless: {
|
ChromeHeadless: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: [
|
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
|
||||||
'--no-sandbox',
|
|
||||||
'--headless',
|
|
||||||
'--disable-gpu',
|
|
||||||
'--remote-debugging-port=9222'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
/* eslint-env es6 */
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
const { constants } = require('karma');
|
const { constants } = require('karma');
|
||||||
|
|
||||||
@ -8,23 +9,23 @@ module.exports = function (config) {
|
|||||||
basePath: '../../',
|
basePath: '../../',
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
{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, served: true},
|
{ pattern: 'node_modules/pdfjs-dist/build/pdf.worker.js', included: true, watched: false, served: true },
|
||||||
{pattern: 'node_modules/pdfjs-dist/build/pdf.worker.min.js', included: true, watched: false, served: true},
|
{ pattern: 'node_modules/pdfjs-dist/build/pdf.worker.min.js', included: true, watched: false, served: true },
|
||||||
{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: 'lib/core/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/i18n/**/en.json', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/**/*.ts', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/**/*.ts', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/assets/**/*.svg', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/assets/**/*.svg', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/assets/**/*.png', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/assets/**/*.png', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/config/app.config.json', included: false, served: true, watched: false},
|
{ pattern: 'lib/config/app.config.json', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.pdf', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.pdf', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.txt', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.txt', included: false, served: true, watched: false },
|
||||||
{pattern: 'lib/core/src/lib/viewer/assets/fake-test-video.mp4', included: false, served: true, watched: false},
|
{ pattern: 'lib/core/src/lib/viewer/assets/fake-test-video.mp4', included: false, served: true, watched: false },
|
||||||
{
|
{
|
||||||
pattern: 'lib/core//viewer/assets/fake-test-password-file.pdf',
|
pattern: 'lib/core//viewer/assets/fake-test-password-file.pdf',
|
||||||
included: false,
|
included: false,
|
||||||
@ -36,21 +37,21 @@ module.exports = function (config) {
|
|||||||
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
|
frameworks: ['jasmine-ajax', 'jasmine', '@angular-devkit/build-angular'],
|
||||||
|
|
||||||
proxies: {
|
proxies: {
|
||||||
'/pdf.worker.min.js' :'/base/node_modules/pdfjs-dist/build/pdf.worker.min.js',
|
'/pdf.worker.min.js': '/base/node_modules/pdfjs-dist/build/pdf.worker.min.js',
|
||||||
'/pdf.worker.js' :'/base/node_modules/pdfjs-dist/build/pdf.worker.js',
|
'/pdf.worker.js': '/base/node_modules/pdfjs-dist/build/pdf.worker.js',
|
||||||
'/fake-url-file.png' :'/base/lib/core/src/lib/assets/images/logo.png',
|
'/fake-url-file.png': '/base/lib/core/src/lib/assets/images/logo.png',
|
||||||
'/logo.png' :'/base/lib/core/src/lib/assets/images/logo.png',
|
'/logo.png': '/base/lib/core/src/lib/assets/images/logo.png',
|
||||||
'/alfresco-logo.svg' :'/base/lib/core/src/lib/assets/images/alfresco-logo.svg',
|
'/alfresco-logo.svg': '/base/lib/core/src/lib/assets/images/alfresco-logo.svg',
|
||||||
'/assets/images/': '/base/lib/core/src/lib/assets/images/',
|
'/assets/images/': '/base/lib/core/src/lib/assets/images/',
|
||||||
'/assets/images/ecm-background.png': '/base/lib/core/src/lib/assets/images/ecm-background.png',
|
'/assets/images/ecm-background.png': '/base/lib/core/src/lib/assets/images/ecm-background.png',
|
||||||
'/assets/images/bpm-background.png': '/base/lib/core/src/lib/assets/images/bpm-background.png',
|
'/assets/images/bpm-background.png': '/base/lib/core/src/lib/assets/images/bpm-background.png',
|
||||||
'/content.bin': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
'/content.bin': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
||||||
'/base/assets/' :'/base/lib/core/src/lib/assets/',
|
'/base/assets/': '/base/lib/core/src/lib/assets/',
|
||||||
'/assets/adf-core/i18n/en.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/assets/adf-core/i18n/en-US.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en-US.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/fake-content-img' : '/base/lib/core/src/lib/assets/images/logo.png',
|
'/fake-content-img': '/base/lib/core/src/lib/assets/images/logo.png',
|
||||||
'/fake-content-img.bin' : '/base/lib/core/src/lib/assets/images/logo.png',
|
'/fake-content-img.bin': '/base/lib/core/src/lib/assets/images/logo.png',
|
||||||
'/fake-test-file.pdf': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
'/fake-test-file.pdf': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
||||||
'/fake-content-pdf': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
'/fake-content-pdf': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
||||||
'/fake-content-pdf.bin': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
'/fake-content-pdf.bin': '/base/lib/core/src/lib/viewer/assets/fake-test-file.pdf',
|
||||||
@ -77,7 +78,7 @@ module.exports = function (config) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
jasmineHtmlReporter: {
|
jasmineHtmlReporter: {
|
||||||
suppressAll: true, // removes the duplicated traces
|
suppressAll: true // removes the duplicated traces
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
@ -97,12 +98,7 @@ module.exports = function (config) {
|
|||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
ChromeHeadless: {
|
ChromeHeadless: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: [
|
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
|
||||||
'--no-sandbox',
|
|
||||||
'--headless',
|
|
||||||
'--disable-gpu',
|
|
||||||
'--remote-debugging-port=9222'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import { CoreTestingModule } from '../../../testing';
|
|||||||
import { RenderingQueueServices } from '../../services/rendering-queue.services';
|
import { RenderingQueueServices } from '../../services/rendering-queue.services';
|
||||||
import { PdfThumbListComponent } from '../pdf-viewer-thumbnails/pdf-viewer-thumbnails.component';
|
import { PdfThumbListComponent } from '../pdf-viewer-thumbnails/pdf-viewer-thumbnails.component';
|
||||||
import { PdfViewerComponent } from './pdf-viewer.component';
|
import { PdfViewerComponent } from './pdf-viewer.component';
|
||||||
|
import { AnnotationMode } from 'pdfjs-dist';
|
||||||
|
|
||||||
declare const pdfjsLib: any;
|
declare const pdfjsLib: any;
|
||||||
|
|
||||||
@ -159,6 +160,15 @@ describe('Test PdfViewer component', () => {
|
|||||||
document.body.removeChild(elementUrlTestComponent);
|
document.body.removeChild(elementUrlTestComponent);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should init the viewer with annotation mode disabled', (done) => {
|
||||||
|
fixtureUrlTestComponent.detectChanges();
|
||||||
|
|
||||||
|
fixtureUrlTestComponent.whenStable().then(() => {
|
||||||
|
expect(componentUrlTestComponent.pdfViewerComponent.pdfViewer.annotationEditorMode).toBe(AnnotationMode.DISABLE);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
}, 55000);
|
||||||
|
|
||||||
it('should Total number of pages be loaded', (done) => {
|
it('should Total number of pages be loaded', (done) => {
|
||||||
fixtureUrlTestComponent.detectChanges();
|
fixtureUrlTestComponent.detectChanges();
|
||||||
|
|
||||||
@ -243,32 +253,34 @@ describe('Test PdfViewer component', () => {
|
|||||||
}, 55000);
|
}, 55000);
|
||||||
|
|
||||||
describe('Zoom', () => {
|
describe('Zoom', () => {
|
||||||
it('should zoom in increment the scale value', fakeAsync(() => {
|
it('should zoom in increment the scale value', (done) => {
|
||||||
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
||||||
|
|
||||||
const zoomInButton: any = elementUrlTestComponent.querySelector('#viewer-zoom-in-button');
|
const zoomInButton: any = elementUrlTestComponent.querySelector('#viewer-zoom-in-button');
|
||||||
|
|
||||||
tick(250);
|
|
||||||
|
|
||||||
const zoomBefore = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
const zoomBefore = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
||||||
zoomInButton.click();
|
zoomInButton.click();
|
||||||
|
fixtureUrlTestComponent.detectChanges();
|
||||||
|
|
||||||
expect(componentUrlTestComponent.pdfViewerComponent.currentScaleMode).toBe('auto');
|
expect(componentUrlTestComponent.pdfViewerComponent.currentScaleMode).toBe('auto');
|
||||||
const currentZoom = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
const currentZoom = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
||||||
expect(zoomBefore < currentZoom).toBe(true);
|
expect(zoomBefore < currentZoom).toBe(true);
|
||||||
}), 55000);
|
done();
|
||||||
|
}, 55000);
|
||||||
|
|
||||||
it('should zoom out decrement the scale value', fakeAsync(() => {
|
it('should zoom out decrement the scale value', (done) => {
|
||||||
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
||||||
const zoomOutButton: any = elementUrlTestComponent.querySelector('#viewer-zoom-out-button');
|
const zoomOutButton: any = elementUrlTestComponent.querySelector('#viewer-zoom-out-button');
|
||||||
|
|
||||||
tick(250);
|
|
||||||
|
|
||||||
const zoomBefore = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
const zoomBefore = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
||||||
zoomOutButton.click();
|
zoomOutButton.click();
|
||||||
|
fixtureUrlTestComponent.detectChanges();
|
||||||
|
|
||||||
expect(componentUrlTestComponent.pdfViewerComponent.currentScaleMode).toBe('auto');
|
expect(componentUrlTestComponent.pdfViewerComponent.currentScaleMode).toBe('auto');
|
||||||
const currentZoom = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
const currentZoom = componentUrlTestComponent.pdfViewerComponent.pdfViewer.currentScaleValue;
|
||||||
expect(zoomBefore > currentZoom).toBe(true);
|
expect(zoomBefore > currentZoom).toBe(true);
|
||||||
}), 55000);
|
done();
|
||||||
|
}, 55000);
|
||||||
|
|
||||||
it('should it-in button toggle page-fit and auto scale mode', fakeAsync(() => {
|
it('should it-in button toggle page-fit and auto scale mode', fakeAsync(() => {
|
||||||
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
spyOn(componentUrlTestComponent.pdfViewerComponent.pdfViewer, 'forceRendering').and.callFake(() => {});
|
||||||
|
@ -37,7 +37,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { OnProgressParameters, PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist';
|
import { AnnotationMode, OnProgressParameters, PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { catchError, delay } from 'rxjs/operators';
|
import { catchError, delay } from 'rxjs/operators';
|
||||||
import { AppConfigService } from '../../../app-config';
|
import { AppConfigService } from '../../../app-config';
|
||||||
@ -246,7 +246,8 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
container,
|
container,
|
||||||
viewer,
|
viewer,
|
||||||
renderingQueue: this.renderingQueueServices,
|
renderingQueue: this.renderingQueueServices,
|
||||||
eventBus: this.eventBus
|
eventBus: this.eventBus,
|
||||||
|
annotationMode: AnnotationMode.DISABLE
|
||||||
});
|
});
|
||||||
|
|
||||||
// cspell: disable-next
|
// cspell: disable-next
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
/* eslint-env es6 */
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
const { constants } = require('karma');
|
const { constants } = require('karma');
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ module.exports = function (config) {
|
|||||||
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
'/assets/adf-core/i18n/en-GB.json': '/base/lib/core/src/lib/i18n/en.json',
|
||||||
'/assets/adf-process-services-cloud/i18n/en.json': '/base/lib/process-services-cloud/lib/i18n/en.json',
|
'/assets/adf-process-services-cloud/i18n/en.json': '/base/lib/process-services-cloud/lib/i18n/en.json',
|
||||||
'/assets/adf-process-services-cloud/i18n/en-GB.json': '/base/lib/process-services-cloud/lib/i18n/en.json',
|
'/assets/adf-process-services-cloud/i18n/en-GB.json': '/base/lib/process-services-cloud/lib/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'),
|
||||||
@ -50,7 +51,7 @@ module.exports = function (config) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
jasmineHtmlReporter: {
|
jasmineHtmlReporter: {
|
||||||
suppressAll: true, // removes the duplicated traces
|
suppressAll: true // removes the duplicated traces
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
@ -70,12 +71,7 @@ module.exports = function (config) {
|
|||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
ChromeHeadless: {
|
ChromeHeadless: {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: [
|
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']
|
||||||
'--no-sandbox',
|
|
||||||
'--headless',
|
|
||||||
'--disable-gpu',
|
|
||||||
'--remote-debugging-port=9222'
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
/* eslint-env es6 */
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
const { constants } = require('karma');
|
const { constants } = require('karma');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user