various code quality fixes (#5792)

* various code quality fixes

* reduce duplicated code

* add safety check
This commit is contained in:
Denys Vuika
2020-06-18 17:57:46 +01:00
committed by GitHub
parent dc2060fe49
commit e9350bd297
54 changed files with 96 additions and 154 deletions

View File

@@ -101,9 +101,8 @@ describe('Upload component', () => {
afterEach(async () => {
const nbResults = await contentServicesPage.numberOfResultsDisplayed();
if (nbResults > 1) {
const nodesPromise = await contentServicesPage.getElementsDisplayedId();
for (const node of nodesPromise) {
const nodeId = await node;
const nodeIds = await contentServicesPage.getElementsDisplayedId();
for (const nodeId of nodeIds) {
await uploadActions.deleteFileOrFolder(nodeId);
}
}

View File

@@ -91,7 +91,7 @@ describe('Comment component for Processes', () => {
const taskId = taskQuery.data[0].id;
const taskComments = await apiService.getInstance().activiti.commentsApi.getTaskComments(taskId, { 'latestFirst': true });
await expect(await taskComments.total).toEqual(0);
await expect(taskComments.total).toEqual(0);
});
it('[C260466] Should be able to display comments from Task on the related Process', async () => {