Update to v11

This commit is contained in:
Sébastien André
2021-01-08 16:38:04 +01:00
parent 57575c0b81
commit d7c02d7fc0
22 changed files with 340 additions and 608 deletions

View File

@@ -1,24 +1,24 @@
import { TestBed, async } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', async(() => {
it('should create the app', waitForAsync(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
it(`should have as title 'app'`, async(() => {
it(`should have as title 'app'`, waitForAsync(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
}));
it('should render title in a h1 tag', async(() => {
it('should render title in a h1 tag', waitForAsync(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;

View File

@@ -134,7 +134,8 @@ const appRoutes: Routes = [
imports: [
RouterModule.forRoot(
appRoutes,
{ enableTracing: !environment.production } // <-- debugging purposes only
{ enableTracing: !environment.production, relativeLinkResolution: 'legacy' } // <-- debugging purposes only
// <-- debugging purposes only
),
ReactiveFormsModule,
FormsModule,

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { CreateUserComponent } from './create-user.component';
@@ -6,7 +6,7 @@ describe('CreateUserComponent', () => {
let component: CreateUserComponent;
let fixture: ComponentFixture<CreateUserComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CreateUserComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { DefaultComponent } from './default.component';
@@ -6,7 +6,7 @@ describe('DefaultComponent', () => {
let component: DefaultComponent;
let fixture: ComponentFixture<DefaultComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DefaultComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfAircraftsComponent } from './list-of-aircrafts.component';
@@ -6,7 +6,7 @@ describe('ListOfAircraftsComponent', () => {
let component: ListOfAircraftsComponent;
let fixture: ComponentFixture<ListOfAircraftsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfAircraftsComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfDzsComponent } from './list-of-dzs.component';
@@ -6,7 +6,7 @@ describe('ListOfDzsComponent', () => {
let component: ListOfDzsComponent;
let fixture: ComponentFixture<ListOfDzsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfDzsComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfGearsComponent } from './list-of-gears.component';
@@ -6,7 +6,7 @@ describe('ListOfGearsComponent', () => {
let component: ListOfGearsComponent;
let fixture: ComponentFixture<ListOfGearsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfGearsComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfImagesComponent } from './list-of-images.component';
@@ -6,7 +6,7 @@ describe('ListOfImagesComponent', () => {
let component: ListOfImagesComponent;
let fixture: ComponentFixture<ListOfImagesComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfImagesComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfJumpTypesComponent } from './list-of-jump-types.component';
@@ -6,7 +6,7 @@ describe('ListOfJumpTypesComponent', () => {
let component: ListOfJumpTypesComponent;
let fixture: ComponentFixture<ListOfJumpTypesComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfJumpTypesComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ListOfJumpsComponent } from './list-of-jumps.component';
@@ -6,7 +6,7 @@ describe('ListOfJumpsComponent', () => {
let component: ListOfJumpsComponent;
let fixture: ComponentFixture<ListOfJumpsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ListOfJumpsComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { LoginUserComponent } from './login-user.component';
@@ -6,7 +6,7 @@ describe('LoginUserComponent', () => {
let component: LoginUserComponent;
let fixture: ComponentFixture<LoginUserComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ LoginUserComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { LoginComponent } from './login.component';
@@ -6,7 +6,7 @@ describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NewAircraftComponent } from './new-aircraft.component';
@@ -6,7 +6,7 @@ describe('NewAircraftComponent', () => {
let component: NewAircraftComponent;
let fixture: ComponentFixture<NewAircraftComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ NewAircraftComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NewDropZoneComponent } from './new-drop-zone.component';
@@ -6,7 +6,7 @@ describe('NewDropZoneComponent', () => {
let component: NewDropZoneComponent;
let fixture: ComponentFixture<NewDropZoneComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ NewDropZoneComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NewGearComponent } from './new-gear.component';
@@ -6,7 +6,7 @@ describe('NewGearComponent', () => {
let component: NewGearComponent;
let fixture: ComponentFixture<NewGearComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ NewGearComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NewJumpTypeComponent } from './new-jump-type.component';
@@ -6,7 +6,7 @@ describe('NewJumpTypeComponent', () => {
let component: NewJumpTypeComponent;
let fixture: ComponentFixture<NewJumpTypeComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ NewJumpTypeComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NewJumpComponent } from './new-jump.component';
@@ -6,7 +6,7 @@ describe('NewJumpComponent', () => {
let component: NewJumpComponent;
let fixture: ComponentFixture<NewJumpComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ NewJumpComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { SummaryComponent } from './summary.component';
@@ -6,7 +6,7 @@ describe('SummaryComponent', () => {
let component: SummaryComponent;
let fixture: ComponentFixture<SummaryComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SummaryComponent ]
})

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { UserProfileComponent } from './user-profile.component';
@@ -6,7 +6,7 @@ describe('UserProfileComponent', () => {
let component: UserProfileComponent;
let fixture: ComponentFixture<UserProfileComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ UserProfileComponent ]
})