From 4c0f85469c614a04062d1f05b0e9eed623175709 Mon Sep 17 00:00:00 2001 From: lethemanh Date: Fri, 7 Mar 2025 15:51:31 +0700 Subject: [PATCH] Update test id in uploads viewer --- .../pending-root-list.tsx | 41 +++++++++++-------- .../pending-root-row.tsx | 4 +- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-list.tsx b/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-list.tsx index 18a6a672..9abcdc6d 100644 --- a/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-list.tsx +++ b/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-list.tsx @@ -59,28 +59,33 @@ const ModalFooter: React.FC = ({ cancelUpload, isPaused, uploadingCount, -}) => ( -
-
- {uploadingCount > 0 && ( +}) => { + const pauseResumeBtnTestId = isPaused() ? 'testid:upload-root-modal-pause' : 'testid:upload-root-modal-resume'; + const cancelCloseBtnTestId = uploadingCount ? 'testid:upload-root-modal-cancel' : 'testid:upload-root-modal-close'; + + return ( +
+
+ {uploadingCount > 0 && ( + + )} - )} - +
-
-); + ); +} const PendingRootList = ({ roots, diff --git a/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-row.tsx b/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-row.tsx index eeb99735..62e26683 100644 --- a/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-row.tsx +++ b/tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-row.tsx @@ -116,6 +116,8 @@ const PendingRootRow = ({ return rootName; }; + const showFileFolderTestId = !showFolder || isFileRoot ? 'testid:upload-root-modal-row-show-file' : 'testid:upload-root-modal-row-show-folder'; + return (
@@ -141,7 +143,7 @@ const PendingRootRow = ({ {isUploadCompleted ? (