Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test id for scan history operation #2278

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const ScanHistoryDropdown = ({
scan.onDownloadClick(scan.id);
setOpen(false);
}}
data-testid="menuDownloadIconId"
/>
<IconButton
variant="flat"
Expand All @@ -97,6 +98,7 @@ export const ScanHistoryDropdown = ({
scan.onDeleteClick(scan.id);
setOpen(false);
}}
data-testid="menuDeleteIconId"
/>

<IconButton
Expand All @@ -116,6 +118,7 @@ export const ScanHistoryDropdown = ({
scan?.onScanTimeCompareButtonClick?.(scan.timestamp);
setOpen(false);
}}
data-testid="menuCompareIconId"
/>
</div>
</div>
Expand All @@ -125,7 +128,10 @@ export const ScanHistoryDropdown = ({
</>
}
>
<span className="text-h5 flex items-center text-text-input-value gap-x-2">
<span
className="text-h5 flex items-center text-text-input-value gap-x-2"
data-testid="scanHistoryDropdownId"
>
{currentTimeStamp}
<div className="h-4 w-4 text-accent-accent">
<CaretDown />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ const HistoryControls = () => {
nodeType: nodeType as UtilsReportFiltersNodeTypeEnum,
});
}}
data-testid="downloadScanButtonId"
>
Download
</Button>
Expand All @@ -236,6 +237,7 @@ const HistoryControls = () => {
}
disabled={fetchStatus !== 'idle'}
onClick={() => setScanIdToDelete(scan_id ?? '')}
data-testid="deleteScanButtonId"
>
Delete
</Button>
Expand All @@ -256,6 +258,7 @@ const HistoryControls = () => {
showScanTimeModal: true,
});
}}
data-testid="compareScanButtonId"
>
Compare scan
</Button>
Expand Down
Loading