From 906381d468f338626d7519f38d5bc77039f3bcad Mon Sep 17 00:00:00 2001 From: milan-deepfence Date: Mon, 29 Jul 2024 15:54:23 +0530 Subject: [PATCH] Add test id for scan history --- .../dashboard/src/components/scan-history/HistoryList.tsx | 8 +++++++- .../postures/components/scan-result/cloud/ScanHistory.tsx | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/deepfence_frontend/apps/dashboard/src/components/scan-history/HistoryList.tsx b/deepfence_frontend/apps/dashboard/src/components/scan-history/HistoryList.tsx index af91e37a94..d4d5ac5ec6 100644 --- a/deepfence_frontend/apps/dashboard/src/components/scan-history/HistoryList.tsx +++ b/deepfence_frontend/apps/dashboard/src/components/scan-history/HistoryList.tsx @@ -80,6 +80,7 @@ export const ScanHistoryDropdown = ({ scan.onDownloadClick(scan.id); setOpen(false); }} + data-testid="menuDownloadIconId" /> @@ -125,7 +128,10 @@ export const ScanHistoryDropdown = ({ } > - + {currentTimeStamp}
diff --git a/deepfence_frontend/apps/dashboard/src/features/postures/components/scan-result/cloud/ScanHistory.tsx b/deepfence_frontend/apps/dashboard/src/features/postures/components/scan-result/cloud/ScanHistory.tsx index 11bffde9ba..4c1c5d471e 100644 --- a/deepfence_frontend/apps/dashboard/src/features/postures/components/scan-result/cloud/ScanHistory.tsx +++ b/deepfence_frontend/apps/dashboard/src/features/postures/components/scan-result/cloud/ScanHistory.tsx @@ -224,6 +224,7 @@ const HistoryControls = () => { nodeType: nodeType as UtilsReportFiltersNodeTypeEnum, }); }} + data-testid="downloadScanButtonId" > Download @@ -236,6 +237,7 @@ const HistoryControls = () => { } disabled={fetchStatus !== 'idle'} onClick={() => setScanIdToDelete(scan_id ?? '')} + data-testid="deleteScanButtonId" > Delete @@ -256,6 +258,7 @@ const HistoryControls = () => { showScanTimeModal: true, }); }} + data-testid="compareScanButtonId" > Compare scan