mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[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:
committed by
Denys Vuika
parent
9663971256
commit
fcb292c849
@@ -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
|
||||
|
Reference in New Issue
Block a user