The site is more or less working. Some weirdness with animations though
This commit is contained in:
@@ -1,10 +1,22 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import {async, TestBed} from '@angular/core/testing';
|
||||
import {AppComponent} from './app.component';
|
||||
import {ToolbarComponent} from "./toolbar/toolbar.component";
|
||||
import {RouterTestingModule} from "@angular/router/testing";
|
||||
import {MatSidenavModule, MatToolbarModule} from "@angular/material";
|
||||
import {NoopAnimationsModule} from "@angular/platform-browser/animations";
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
MatToolbarModule,
|
||||
MatSidenavModule,
|
||||
NoopAnimationsModule,
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
AppComponent,
|
||||
ToolbarComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
@@ -13,15 +25,4 @@ describe('AppComponent', () => {
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
}));
|
||||
it(`should have as title 'TestWebsite'`, async(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('TestWebsite');
|
||||
}));
|
||||
it('should render title in a h1 tag', async(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to TestWebsite!');
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user