[ADF-3501] PDF view fixes (#3735)

* PDF view fixes

* updated package.lock

* fix failing tests

* restore test

* use fake web worker for tests

* test fixes

* test fixes

* disable i18n test

* test fixes
This commit is contained in:
Denys Vuika
2018-09-04 14:55:44 +01:00
committed by Eugenio Romano
parent 567d172176
commit c0acc53eb9
21 changed files with 101 additions and 94 deletions

View File

@@ -16,14 +16,11 @@
*/
import { SimpleChange } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MediaPlayerComponent } from './mediaPlayer.component';
import { setupTestBed } from '../../testing/setupTestBed';
import { CoreModule } from '../../core.module';
import {
ContentService
} from '../../services';
import { ContentService } from '../../services/content.service';
describe('Test Media player component ', () => {
@@ -40,9 +37,9 @@ describe('Test Media player component ', () => {
imports: [CoreModule.forRoot()]
});
beforeEach(async(() => {
beforeEach(() => {
service = TestBed.get(ContentService);
}));
});
beforeEach(() => {
fixture = TestBed.createComponent(MediaPlayerComponent);
@@ -51,10 +48,13 @@ describe('Test Media player component ', () => {
fixture.detectChanges();
});
afterEach(() => {
fixture.destroy();
});
it('should thrown an error If no url or no blob are passed', () => {
let change = new SimpleChange(null, null, true);
expect(() => {
component.ngOnChanges({ 'blobFile': change });
component.ngOnChanges({});
}).toThrow(new Error('Attribute urlFile or blobFile is required'));
});