mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-4288] Fix API errors from logs (#2006)
* Add API login in afterAll - part 1 * viewer,infoDrawer,extensions - afterAll API login * deleteActions - afterAll API login * Improve before and after methods * add Promise type to methods - part1 * remove unneeded done() method and add try-catch * delete wrong import * Login through API * small change over log errors * small improvement over the logs
This commit is contained in:
@@ -56,11 +56,7 @@ describe('Pagination on multiple pages', () => {
|
||||
}, 400000);
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await userApi.sites.deleteSites(sites);
|
||||
} catch (error) {
|
||||
Logger.error(`----- afterAll failed : ${error}`);
|
||||
}
|
||||
await userApi.sites.deleteSites(sites);
|
||||
});
|
||||
|
||||
describe('on My Libraries', () => {
|
||||
|
@@ -43,12 +43,11 @@ describe('Pagination on multiple pages on Trash', () => {
|
||||
const { dataTable, pagination } = page;
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminApiActions.login();
|
||||
await adminApiActions.createUser({ username });
|
||||
await userActions.login(username, username);
|
||||
|
||||
filesDeletedIds = (await userApi.nodes.createFiles(filesForDelete)).list.entries.map((entries: any) => entries.entry.id);
|
||||
|
||||
await userActions.login(username, username);
|
||||
await userActions.deleteNodes(filesDeletedIds, false);
|
||||
await userActions.waitForTrashcanSize(51);
|
||||
|
||||
@@ -61,6 +60,7 @@ describe('Pagination on multiple pages on Trash', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await userActions.login(username, username);
|
||||
await userActions.emptyTrashcan();
|
||||
});
|
||||
|
||||
|
@@ -49,12 +49,12 @@ describe('Pagination on single page', () => {
|
||||
const searchResultsPage = new SearchResultsPage();
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminApiActions.login();
|
||||
await adminApiActions.createUser({ username });
|
||||
await userActions.login(username, username);
|
||||
|
||||
const initialFavoriteTotalItems = await userApi.favorites.getFavoritesTotalItems();
|
||||
const initialRecentFilesTotalItems = await userApi.search.getTotalItems(username);
|
||||
|
||||
await userActions.login(username, username);
|
||||
const initialTrashTotalItems = await userActions.getTrashcanSize();
|
||||
|
||||
fileId = (await userApi.nodes.createFile(file)).entry.id;
|
||||
@@ -74,6 +74,7 @@ describe('Pagination on single page', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await userActions.login(username, username);
|
||||
await userActions.deleteNodes([fileId]);
|
||||
await userActions.deleteSites([siteId]);
|
||||
await userActions.emptyTrashcan();
|
||||
|
Reference in New Issue
Block a user