[ACS-6572] break dependency on adf-testing (#3594)

* remove Logger dependency

* remove BrowserVisibility dependency

* remove BrowserActions dependency

* remove ViewerPage dependency

* remove ApiUtil dependency

* remove StringUtil dependency

* remove adf-testing dependency

* bug fixes
This commit is contained in:
Denys Vuika
2024-01-11 09:02:58 -05:00
committed by GitHub
parent 09aba59b06
commit dbe724552f
61 changed files with 871 additions and 538 deletions

View File

@@ -23,7 +23,6 @@
*/
import { ApiClientFactory } from './api-client-factory';
import { Logger } from '@alfresco/adf-testing';
import { Utils } from '../utils';
import { ResultSetPaging } from '@alfresco/js-api';
@@ -54,14 +53,13 @@ export class SearchPageApi {
try {
return await this.apiService.search.search(data);
} catch (error) {
Logger.error(`SearchApi queryRecentFiles : catch : `, error);
return new ResultSetPaging;
} catch {
return new ResultSetPaging();
}
}
async getTotalItems(username: string): Promise<number> {
return (await this.querySearchFiles(username)).list.pagination.totalItems;
return (await this.querySearchFiles(username)).list.pagination.totalItems;
}
async waitForApi(username: string, data: { expect: number }) {
@@ -76,9 +74,6 @@ export class SearchPageApi {
};
return await Utils.retryCall(searchFiles);
} catch (error) {
Logger.error(`SearchApi waitForApi : catch : `);
Logger.error(`\tExpected: ${data.expect} items, but found ${error}`);
}
} catch {}
}
}