[ADF-1731] update material2 beta12 e angular2 4.4.5 (#2475)

* update material2 beta12
update angular2 4.4.5

* fix changed version js-api

* update types hammerjs

* fix test

* clean old doc

* fix pagination test

* fix test

* missing update packages

* fix <mat-form-field> for select box

* start task component test
This commit is contained in:
Eugenio Romano
2017-10-16 09:58:19 +01:00
committed by Denys Vuika
parent 9663971256
commit fcb292c849
290 changed files with 1702 additions and 2456 deletions

View File

@@ -16,11 +16,13 @@
*/
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, TestBed } from '@angular/core/testing';
import { MaterialModule } from '@angular/material';
import { CoreModule } from 'ng2-alfresco-core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HttpModule } from '@angular/http';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { MaterialModule } from '../../material.module';
import { LogService } from '../../services/log.service';
import { AlfrescoTranslateLoader } from '../../services/translate-loader.service';
import { TranslationService } from '../../services/translation.service';
import { PaginationComponent } from './pagination.component';
declare let jasmine: any;
@@ -38,21 +40,10 @@ class FakePaginationInput {
}
}
class TestConfig {
testBed: any = null;
constructor() {
this.testBed = TestBed.configureTestingModule({
imports: [
CoreModule,
MaterialModule
],
schemas: [ NO_ERRORS_SCHEMA ]
});
}
}
describe('PaginationComponent', () => {
let fixture: ComponentFixture<PaginationComponent>;
beforeEach(() => {
jasmine.Ajax.install();
});
@@ -62,12 +53,28 @@ describe('PaginationComponent', () => {
});
beforeEach(async(() => {
const test = new TestConfig();
test.testBed
.compileComponents()
TestBed.configureTestingModule({
imports: [
HttpModule,
MaterialModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: AlfrescoTranslateLoader
}
})
],
declarations: [
PaginationComponent
],
providers: [
TranslationService,
LogService
],
schemas: [ NO_ERRORS_SCHEMA ]
}).compileComponents()
.then(() => {
const fixture = test.testBed.createComponent(PaginationComponent);
fixture = TestBed.createComponent(PaginationComponent);
const component: PaginationComponent = fixture.componentInstance;
(<any> component).ngAfterViewInit = jasmine