mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
567d172176
commit
c0acc53eb9
@@ -18,7 +18,7 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { UserProcessModel } from '../../../../models';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { FormFieldTypes } from '../core/form-field-types';
|
||||
import { FormFieldModel } from '../core/form-field.model';
|
||||
@@ -27,6 +27,7 @@ import { PeopleWidgetComponent } from './people.widget';
|
||||
import { setupTestBed } from '../../../../testing/setupTestBed';
|
||||
import { CoreModule } from '../../../../core.module';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
describe('PeopleWidgetComponent', () => {
|
||||
|
||||
@@ -34,6 +35,7 @@ describe('PeopleWidgetComponent', () => {
|
||||
let fixture: ComponentFixture<PeopleWidgetComponent>;
|
||||
let element: HTMLElement;
|
||||
let formService: FormService;
|
||||
let translationService: TranslateService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
@@ -46,6 +48,10 @@ describe('PeopleWidgetComponent', () => {
|
||||
fixture = TestBed.createComponent(PeopleWidgetComponent);
|
||||
formService = TestBed.get(FormService);
|
||||
|
||||
translationService = TestBed.get(TranslateService);
|
||||
spyOn(translationService, 'instant').and.callFake(key => { return key; });
|
||||
spyOn(translationService, 'get').and.callFake(key => { return of(key); });
|
||||
|
||||
element = fixture.nativeElement;
|
||||
widget = fixture.componentInstance;
|
||||
widget.field = new FormFieldModel(new FormModel());
|
||||
|
@@ -28,11 +28,13 @@ import { TypeaheadWidgetComponent } from './typeahead.widget';
|
||||
import { setupTestBed } from '../../../../testing/setupTestBed';
|
||||
import { CoreModule } from '../../../../core.module';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
describe('TypeaheadWidgetComponent', () => {
|
||||
|
||||
let formService: FormService;
|
||||
let widget: TypeaheadWidgetComponent;
|
||||
let translationService: TranslateService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
@@ -42,6 +44,10 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
translationService = TestBed.get(TranslateService);
|
||||
spyOn(translationService, 'instant').and.callFake(key => { return key; });
|
||||
spyOn(translationService, 'get').and.callFake(key => { return of(key); });
|
||||
|
||||
formService = new FormService(null, null, null);
|
||||
widget = new TypeaheadWidgetComponent(formService, null);
|
||||
widget.field = new FormFieldModel(new FormModel({ taskId: 'task-id' }));
|
||||
|
Reference in New Issue
Block a user