fixed tests after angular 10 upgrade

This commit is contained in:
Giuseppe Digilio
2020-12-03 19:45:05 +01:00
parent 9ed1c74f29
commit 10d0c2e518
212 changed files with 1461 additions and 1333 deletions

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { ChangeDetectorRef, Component, NO_ERRORS_SCHEMA } from '@angular/core';
import { BrowserModule, By } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
@@ -118,6 +118,8 @@ describe('ResourcePolicyFormComponent test suite', () => {
let de;
let scheduler: TestScheduler;
const formService: any = getMockFormService();
const resourcePolicy: any = {
id: '1',
name: null,
@@ -153,7 +155,7 @@ describe('ResourcePolicyFormComponent test suite', () => {
findAll: jasmine.createSpy('findAll')
});
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserModule,
@@ -170,7 +172,7 @@ describe('ResourcePolicyFormComponent test suite', () => {
],
providers: [
{ provide: EPersonDataService, useValue: epersonService },
{ provide: FormService, useValue: getMockFormService() },
{ provide: FormService, useValue: formService },
{ provide: GroupDataService, useValue: groupService },
{ provide: RequestService, useValue: getMockRequestService() },
FormBuilderService,
@@ -189,6 +191,7 @@ describe('ResourcePolicyFormComponent test suite', () => {
// synchronous beforeEach
beforeEach(() => {
formService.isValid.and.returnValue(observableOf(true));
const html = `
<ds-resource-policy-form [resourcePolicy]="resourcePolicy" [isProcessing]="isProcessing"></ds-resource-policy-form>`;