mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user