[ADF-5422] remove deprecated "async()" from unit tests (#7109)

* remove angualar async from content services

* upgrade more tests

* upgrade core tests

* upgrade tests

* fix deprecated constant

* fix tests

* fix after rebase
This commit is contained in:
Denys Vuika
2021-06-15 16:16:15 +01:00
committed by GitHub
parent ba03c60adb
commit 3079aa48c3
121 changed files with 5316 additions and 4780 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { ComponentFixture, TestBed, fakeAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { CardViewKeyValuePairsItemModel } from '../../models/card-view-keyvaluepairs.model';
import { CardViewKeyValuePairsItemComponent } from './card-view-keyvaluepairsitem.component';
@@ -28,7 +28,7 @@ describe('CardViewKeyValuePairsItemComponent', () => {
let fixture: ComponentFixture<CardViewKeyValuePairsItemComponent>;
let component: CardViewKeyValuePairsItemComponent;
let cardViewUpdateService;
let cardViewUpdateService: CardViewUpdateService;
const mockEmptyData = [{ name: '', value: '' }];
const mockData = [{ name: 'test-name', value: 'test-value' }];
@@ -125,7 +125,7 @@ describe('CardViewKeyValuePairsItemComponent', () => {
expect(component.property.value.length).toBe(0);
});
it('should update property on input blur', async(() => {
it('should update property on input blur', fakeAsync(() => {
spyOn(cardViewUpdateService, 'update');
component.ngOnChanges();
fixture.detectChanges();
@@ -153,7 +153,7 @@ describe('CardViewKeyValuePairsItemComponent', () => {
});
}));
it('should not update property if at least one input is empty on blur', async(() => {
it('should not update property if at least one input is empty on blur', fakeAsync(() => {
spyOn(cardViewUpdateService, 'update');
component.ngOnChanges();
fixture.detectChanges();