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:
@@ -18,7 +18,7 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { SpyLocation } from '@angular/common/testing';
|
||||
import { Component } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick, async } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, RenditionsService } from '../../services';
|
||||
|
||||
import { throwError } from 'rxjs';
|
||||
@@ -715,7 +715,7 @@ describe('ViewerComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should emit `showViewerChange` event on close', async(() => {
|
||||
it('should emit `showViewerChange` event on close', async () => {
|
||||
|
||||
spyOn(component.showViewerChange, 'emit');
|
||||
|
||||
@@ -723,11 +723,10 @@ describe('ViewerComponent', () => {
|
||||
button.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(component.showViewerChange.emit).toHaveBeenCalled();
|
||||
});
|
||||
}));
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.showViewerChange.emit).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not render close viewer button if it is a shared link', (done) => {
|
||||
spyOn(alfrescoApiService.getInstance().core.sharedlinksApi, 'getSharedLink')
|
||||
|
Reference in New Issue
Block a user