Skip to content

Commit

Permalink
code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrathod28 committed Dec 20, 2023
1 parent 6e03faf commit e25e96b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions e2e/playwright/list-views/src/tests/sort-list-login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down
12 changes: 4 additions & 8 deletions e2e/playwright/list-views/src/tests/sort-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]]]);
});

Expand Down

0 comments on commit e25e96b

Please sign in to comment.