mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10838] add logs for failed test update branch
This commit is contained in:
@@ -101,4 +101,4 @@ runs:
|
|||||||
- name: Debug alfresco-search-enterprise-mediation logs
|
- name: Debug alfresco-search-enterprise-mediation logs
|
||||||
if: failure()
|
if: failure()
|
||||||
shell: bash
|
shell: bash
|
||||||
run: kubectl logs kubectl logs acs-elasticsearch-es-0
|
run: kubectl logs acs-elasticsearch-es-0
|
||||||
|
|||||||
@@ -39,21 +39,25 @@ test.describe('Pagination on multiple pages : ', () => {
|
|||||||
const apiClientFactory = new ApiClientFactory();
|
const apiClientFactory = new ApiClientFactory();
|
||||||
|
|
||||||
test.beforeAll(async () => {
|
test.beforeAll(async () => {
|
||||||
test.setTimeout(timeouts.extendedTest);
|
try {
|
||||||
await apiClientFactory.setUpAcaBackend('admin');
|
test.setTimeout(timeouts.extendedTest);
|
||||||
await apiClientFactory.createUser({ username });
|
await apiClientFactory.setUpAcaBackend('admin');
|
||||||
nodesApi = await NodesApi.initialize(username, username);
|
await apiClientFactory.createUser({ username });
|
||||||
favoritesApi = await FavoritesPageApi.initialize(username, username);
|
nodesApi = await NodesApi.initialize(username, username);
|
||||||
|
favoritesApi = await FavoritesPageApi.initialize(username, username);
|
||||||
|
|
||||||
const files = Array(51)
|
const files = Array(51)
|
||||||
.fill('my-file')
|
.fill('my-file')
|
||||||
.map((name, index): string => `${name}-${index + 1}-${random}.txt`);
|
.map((name, index): string => `${name}-${index + 1}-${random}.txt`);
|
||||||
|
|
||||||
await nodesApi.createFolder(parent);
|
await nodesApi.createFolder(parent);
|
||||||
const filesIds = (await nodesApi.createFiles(files, parent)).list.entries.map((entries) => entries.entry.id);
|
const filesIds = (await nodesApi.createFiles(files, parent)).list.entries.map((entries) => entries.entry.id);
|
||||||
initialFavoritesTotalItems = await favoritesApi.getFavoritesTotalItems(username);
|
initialFavoritesTotalItems = await favoritesApi.getFavoritesTotalItems(username);
|
||||||
|
|
||||||
await favoritesApi.addFavoritesByIds('file', filesIds);
|
await favoritesApi.addFavoritesByIds('file', filesIds);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('multiple-pages-files.e2e: beforeAll failed', error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll(async () => {
|
test.afterAll(async () => {
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ export class FavoritesPageApi {
|
|||||||
favorites.push(favorite);
|
favorites.push(favorite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {
|
||||||
|
console.error('FavoritesApi: addFavoritesByIds failed ');
|
||||||
|
}
|
||||||
return favorites;
|
return favorites;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,6 +100,7 @@ export class FavoritesPageApi {
|
|||||||
try {
|
try {
|
||||||
return (await this.apiService.favorites.listFavorites(username)).list.pagination.totalItems;
|
return (await this.apiService.favorites.listFavorites(username)).list.pagination.totalItems;
|
||||||
} catch {
|
} catch {
|
||||||
|
console.error('FavoritesApi: getFavoritesTotalItems failed ');
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user