[ADF-5415] remove deprecated async method (#7171)

* remove deprecated async method

* fix tests and code

* test fixes

* fix tests
This commit is contained in:
Denys Vuika
2021-07-12 20:09:47 +01:00
committed by GitHub
parent 059aa8ba06
commit a4c3f3a95b
41 changed files with 194 additions and 200 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AppConfigService, setupTestBed } from '@alfresco/adf-core';
import { WebscriptComponent } from './webscript.component';
import { ContentTestingModule } from '../testing/content.testing.module';
@@ -36,7 +36,7 @@ describe('WebscriptComponent', () => {
]
});
beforeEach(async(() => {
beforeEach(() => {
const appConfig: AppConfigService = TestBed.inject(AppConfigService);
appConfig.config.ecmHost = 'http://localhost:9876/ecm';
@@ -48,7 +48,7 @@ describe('WebscriptComponent', () => {
component.scriptPath = 'fakePath';
component.showData = true;
fixture.detectChanges();
}));
});
describe('View', () => {
it('html wrapper should be present', () => {

View File

@@ -89,7 +89,7 @@ export class WebscriptComponent implements OnChanges {
this.clean();
}
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
this.apiService.getInstance().webScript.executeWebScript('GET', this.scriptPath, this.scriptArgs, this.contextRoot, this.servicePath).then((webScriptData) => {
this.data = webScriptData;