Merge branch 'master' of https://github.com/4Science/dspace-angular into Environments

# Conflicts:
#	README.md
This commit is contained in:
Giuseppe Digilio
2017-01-20 15:17:27 +01:00
4 changed files with 39 additions and 17 deletions

View File

@@ -9,11 +9,11 @@ import {
CUSTOM_ELEMENTS_SCHEMA,
DebugElement
} from "@angular/core";
import { By } from '@angular/platform-browser';
import { TranslateModule } from "ng2-translate";
import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
import { Store } from "@ngrx/store";
// Load the implementations that should be tested
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
@@ -25,10 +25,10 @@ let fixture: ComponentFixture<AppComponent>;
let de: DebugElement;
let el: HTMLElement;
describe('App component', () => {
beforeEach(() => {
// async beforeEach
beforeEach(async(() => {
return TestBed.configureTestingModule({
imports: [ CommonModule, TranslateModule.forRoot(), NgbCollapseModule.forRoot()],
declarations: [ AppComponent, HeaderComponent ], // declare the test component
@@ -40,10 +40,18 @@ describe('App component', () => {
}
],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
});
})
}));
// synchronous beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
comp = fixture.componentInstance; // BannerComponent test instance
// query for the title <p> by CSS element selector
de = fixture.debugElement.query(By.css('p'));
el = de.nativeElement;
});
it('should create component', inject([AppComponent], (app: AppComponent) => {