From e25e96b667e39de2c0cd303afc50909869e94aff Mon Sep 17 00:00:00 2001 From: "akash.rathod@hyland.com" Date: Wed, 20 Dec 2023 07:20:29 +0100 Subject: [PATCH] code fix --- .../list-views/src/tests/sort-list-login.spec.ts | 12 ++++-------- .../list-views/src/tests/sort-list.spec.ts | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/e2e/playwright/list-views/src/tests/sort-list-login.spec.ts b/e2e/playwright/list-views/src/tests/sort-list-login.spec.ts index 5ecb414c58..c026e7221e 100644 --- a/e2e/playwright/list-views/src/tests/sort-list-login.spec.ts +++ b/e2e/playwright/list-views/src/tests/sort-list-login.spec.ts @@ -81,21 +81,17 @@ test.describe('Remember sorting', () => { const fileActionUser2 = await FileActionsApi.initialize(user2, user2); const filesIdsUser1: NodesIds = {}; const filesIdsUser2: NodesIds = {}; - await Promise.all( + await Promise.all([ testData.user1.files.pdf.map( async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id) - ) - ); - await Promise.all( + ), testData.user1.files.jpg.map( async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.JPG_FILE.path, i, '-my-')).entry.id) - ) - ); - await Promise.all( + ), testData.user2.files.map( async (i) => (filesIdsUser2[i] = (await fileActionUser2.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id) ) - ); + ]); }); test.beforeEach(async ({ page, personalFiles }) => { diff --git a/e2e/playwright/list-views/src/tests/sort-list.spec.ts b/e2e/playwright/list-views/src/tests/sort-list.spec.ts index 3804ac7819..16d6e4ba33 100644 --- a/e2e/playwright/list-views/src/tests/sort-list.spec.ts +++ b/e2e/playwright/list-views/src/tests/sort-list.spec.ts @@ -70,21 +70,17 @@ test.describe('Remember sorting', () => { nodeActionUser1 = await NodesApi.initialize(user1, user1); const filesIdsUser1: NodesIds = {}; const filesIdsUser2: NodesIds = {}; - await Promise.all( + await Promise.all([ testData.user1.files.pdf.map( async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id) - ) - ); - await Promise.all( + ), testData.user1.files.jpg.map( async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.JPG_FILE.path, i, '-my-')).entry.id) - ) - ); - await Promise.all( + ), testData.user2.files.map( async (i) => (filesIdsUser2[i] = (await fileActionUser2.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id) ) - ); + ]); await favoritesActions.addFavoritesByIds('file', [filesIdsUser1[pdfFileNames[0]], filesIdsUser1[pdfFileNames[1]]]); });